Forum Moderators: phranque

Message Too Old, No Replies

i'de like some help with mod rewrite

mod_rewrite, nt working with new server

         

willroy

9:52 pm on Jun 10, 2008 (gmt 0)

10+ Year Member



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_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.

jdMorgan

2:10 pm on Jun 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> the rule is not working

May we have more information, please?

How did you test?
What were the results?
How did results differ from your expectations?
What did you see in your browser?
What do you see in your server error log?

Jim