htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Help with my mod_rewrite rule!
PostPosted: 10 Jun 2008 22:30 
Offline

Joined: 10 Jun 2008 22:25
Posts: 1
Hi,

I have been using the following rewrite rule with no problems on my local machine using wampserver. It just sends back a 404 page when you try and access a page.

However now I have uploaded to a web server, the rule is not working. PHPinfo() tells me that the module is installed.

Code:
RewriteEngine on
#
# Externally redirect to add missing trailing slash if URL path does not contain a period or end with a slash
RewriteCond $1 ^[^\.]+[^/]$
RewriteRule (.*) http://%{HTTP_HOST}/~marketha/$1/ [R=301,L]
#
RewriteRule ([^/]+\.css)$ $1 [L]
#
# Allow access to jscript and stylesheets for subdirectories
rewritecond %{REQUEST_FILENAME} !^(.+)\.css$
rewritecond %{REQUEST_FILENAME} !^(.+)\.js$
# Internally rewrite SEO-friendly URLs to script
RewriteCond $1 !^images
RewriteCond $1 !^cmsadmin
RewriteRule ^([^/]+)/$ index.php?m=$1 [L]
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/$ index.php?m=$1&p=$2&s=$3 [L]
RewriteRule ^([^/]+)/([^/]+)/$ index.php?m=$1&p=$2 [L]
RewriteRule ^([^/]+)/$ index.php?m=$1 [L]



Could there be any other factors effecting it?

Any help apreciated, many thanks, Will.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB