Forum Moderators: phranque
categories/anything/index.php?id=13 to
categories/index.php?id=13
To achieve that, I've uploaded a .htaccess file to "categories" directory that contains the following:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^[.*]/index\.php\?id=([0-9]*)$ index.php?id=$1
</IfModule>
But it keeps giving a 500 error
How do I fix this?
Many Thanks
RewriteEngine on
RewriteRule ^[^/]+/index\.php$ /categories/index.php [L]
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=[0-9]+$
RewriteRule ^[^/]+/index\.php$ /categories/index.php [L]
If you still get a 500-Server Error, take a look at your server error log file -- It will often tell you exactly what is wrong. The most likely cause would be that your server config requires you to add
Options +FollowSymLinks above this code snippet -- But don't add that unless it's required. Jim