Reputation: 31
Hello all i could use a little help i am using the latest version of Wampserver and i am having issues with RewriteCond... I have all the files/folders in the correct places but still it says Page not found!
Is the error in my code or in the Wampserver it's self? i have the rewrite_modual on
RewriteEngine On
Options +Followsymlinks
RewriteBase /
RewriteRule imgs/(.*)\.php /violation.php?file=$1 [QSA,L]
RewriteRule page_files/(.*)\.php /violation.php?file=$1 [QSA,L]
RewriteRule lang/(.*)\.php /violation.php?file=$1 [QSA,L]
RewriteRule styles/(.*)\.php /violation.php?file=$1 [QSA,L]
RewriteRule profile/(.*)\.php /violation.php?file=$1 [QSA,L]
Upvotes: 0
Views: 946
Reputation: 4711
It is your first rule: RewriteRule ^.* - [L,QSA]
. It is matching all requests and causing the rest to be ignored.
UPDATE
To redirect /page_files/
to the violation.php
, add the following:
RewriteRule page_files/?$ /violation.php? [QSA,L]
If you wanted, it could be combined with your other page_files
rule, but should work as-is.
This will catch all requests to the page_files
path or anything within it
RewriteRule page_files/?(.*) /profile.php?file=$1 [QSA,L]
Upvotes: 1