Current location: Hot Scripts Forums » Other Discussions » Web Servers » mod_rewrite issue

mod_rewrite issue

Reply
  #1 (permalink)  
Old 07-01-09, 11:49 PM
doob doob is offline
Newbie Coder
 
Join Date: Jun 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
mod_rewrite issue

Hi everyone,
Im trying to optimize our webpage and while using firebug, it seems that a lot of pages are being unnecessarily 301 redirected (we have Simple <acronym title="Search Engine Optimization">SEO</acronym> installed for zen cart).

Here is the htaccess file; (I have put modrewrite off clauses in some folder but cant get all files)

Code:
php_value max_execution_time 3600

#### BOF SSU
Options +FollowSymLinks -MultiViews
RewriteEngine On
# Make sure to change "zencart" to the subfolder you install ZC. If you use root folder, change to: RewriteBase /
RewriteBase /

# Deny access from .htaccess
RewriteRule ^\.htaccess$ - [F]

RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]
#### EOF SSU
How can i add a clause to stop redirecting images, css files, etc to avoid problems?

Thanks in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-03-09, 06:57 PM
wirehopper's Avatar
wirehopper wirehopper is offline
Community Liaison
 
Join Date: Feb 2006
Posts: 2,270
Thanks: 15
Thanked 84 Times in 82 Posts
Put this right after the RewriteBase. It should prevent rewrites for all files with those extensions. Added any other extensions you want.

Code:
RewriteRule   ^*\.(jpe?g|png|gif|css)$ -
(Not tested)

I don't think this will impact SEO, one way or another.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue with global Keyword spyke01 PHP 5 12-03-08 03:18 PM
[SOLVED] PHP AJAX and IE disabled option issue Dan Man PHP 1 08-26-08 03:34 PM
Odd Z-Indexing Issue im running to with IE nova912 CSS 1 09-16-06 04:21 PM
Issue Tracking and Task management SlackeR Script Requests 8 10-05-05 05:29 PM
Language issue in from property, Please Help AskAR ASP 0 08-10-05 07:40 AM


All times are GMT -5. The time now is 02:19 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.