Forum Moderators: phranque
RewriteEngine On
RewriteRule ^/([a-z0-9]+)/?$ /index.cfm?event=$1 [PT,NC,L]
RewriteRule ^/([a-z0-9-]+)/([a-z0-9-]+)/?$ /index.cfm?event=$1.$2 [PT,NC,L]
RewriteRule ^/([a-z0-9-]+)/([a-z0-9-]+)/([a-z0-9-]+)/?$ /index.cfm?event=$1.$2&sortorder=$3 [PT,NC,L]
RewriteRule ^/([a-z0-9-]+)/([a-z0-9-]+)/([a-z0-9-]+)/([a-z0-9-]+)/([a-z0-9-]+)/([a-z0-9-]+)?$ /index.cfm?even
However, once I insert the same code into the production Apache config file, nothing happens - no errors, the site continues to behave the same way. When I test my SES URL's, I simply get "The file could not be found".
The only major difference between the two servers is that the production version has a list of virtualhost directives at the bottom:
<VirtualHost 38.113.18.17:80>
ServerName library.site.com
DocumentRoot c:/InetPub/wwwroot/mylibrary
ServerAdmin admin@site.com
</VirtualHost>
I have also attempted to put the rewrite code simply into a .htaccess file - but nothing happens. I am not even sure if the htaccess file gets called at all.
I have set AllowOverride All wherever I found a <Directory> tag.
Any help is much much appreciated. I have been working on this for two days straight.
Thanks
K
I'd suggest testing with a very simple mod_rewrite rule until you're sure that mod_rewrite is actually running, something like:
RewriteRule ^foo\.html$ http://www.example.com/your_home_page_here.html [R=301,L]
Jim