Reputation: 373
I have installed WAMP and enabled the mod_rewrite module.
I am not used to developing on a windows machine, any recommendations?
<IfModule mod_rewrite.so>
Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d //Rewrites if the directory doesn't exist
RewriteCond %{REQUEST_FILENAME} !-f //Rewrites if the file doesn't exist
RewriteRule ^(.*)$ index.php?cat=$1 [L,QSA] // Change this to suit your needs
</IfModule>
localWebsite.ht.local, loads correctly.
localWebsite.ht.local/index.php, loads correctly.
localWebsite.ht.local/myQuery, does not load correctly, it gives a 404.
Upvotes: 0
Views: 60
Reputation: 143886
The rules look fine and assuming you've got the htaccess file in the correct directory (your domain's document root) then the only thing wrong that I see is that you're checking for the wrong module.
Because of a peculiarity in the way apache checks for modules, you need to check for the .c
file, not the shared object file:
<IfModule mod_rewrite.c>
Then ensure that you have the rewrite module loaded.
Upvotes: 1