I've been trying to get this mod rewrite thing down. Basically I want:
- removed.com/WineGlass/Vin.php
- removed.com/Chandelier/Auto.php
To be translated to:
- removed.com/news.php?post=Vin.php&cat=WineGlass
- removed.com/news.php?post=Auto.php&cat=Chandelier
So far I have:
Options -Multiviews Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(.*)/(\w+.php)$ ./news.php?cat=$1&post=$2 My understanding of what is going on is that it should be attempting to determine if the file exists and if it does not, check to see if it meets the patter. If it meets the pattern, it should rewrite the url to the one desired.
- I use GoDaddy.com as my host and I found many posts on the internet suggesting that -Multiviews was required.
- The exact error is: The requested URL /poz/WineGlass/Vin.php was not found on this server.
- the root is /removed/ and that is where news.php rests
- I used regexr.com to test the regular expression: http://regexr.com?37s5e
- Bonus: I tried several ways to exclude the last URL in the example above but was unable to. If you can help with that, I would be very greatful.