So for two days I can not understand why this won’t work…:
Options -Indexes
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^advice/([a-zA-Z]+)/([0-9]+)/$ advice.php?advice=$1&id=$2
Obviously .htaccess is allowed since I am not able to directory open folders, but why doesn’t the link work?
2
Answers
Try turning off
multiviews
so the server doesn’t try and search for that as a file. In addition add the conditions so that it knows it’s not looking for a real file or directory it’s trying to serve and make the trailing slash optional.Does your
RewriteRule
redirect to an existing file?Try this, it works for me
http://example.com/test2/.htaccess
shows the location of the.htaccess
filehttp://example.com/test2/test.php
is a direct linkhttp://example.com/test2/testX4XX
opens the same test.php file using rewrite