Hi all, I have a requirement to change all underscores to dashes, well I have achieved that with these two lines: RewriteRule ^([^_]*)_(.*)$ /$1-$2 [R=301,L] RewriteRule ^([^_]*)_([^_]*)$ /$1-$2 [L,R=301] However now I need to restrict these rules to only apply to a certain page "help.php" (its in the root directory) I thought this might do the trick: <If "%{REQUEST_FILENAME} ^help/.php$"> RewriteRule ^([^_]*)_(.*)$ /$1-$2 [R=301,L] RewriteRule ^([^_]*)_([^_]*)$ /$1-$2 [L,R=301] </If> But that throws a 500 error. can anyone provide some help on how to achieve this? thanks!!
Hi. What happens if you change <If "%{REQUEST_FILENAME} ^help/.php$"> to <If "%{REQUEST_FILENAME} ^help\.php$"> (note the slash in help.php)? I don't really know <if> rules. I assume they are the same as RewriteCond?