Forum Moderators: phranque
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_HOST}...] [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 appreciated, many thanks, Will.