apache - How to fix .htaccess RewriteRule conflict? -
i have conflict rewriterule .htaccess.
rewriteengine on rewritebase / rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule . /index.php [l] rewriterule ^unsubscribe.php$/template/adcf.org/newsletter/unsubscribe.php rewriterule ^(unsubscribe)/?$ /$1.php [l,nc]
this
rewriterule . /index.php [l]
conflict with
rewriterule ^unsubscribe.php$/template/adcf.org/newsletter/unsubscribe.php rewriterule ^(unsubscribe)/?$ /$1.php [l,nc]
please me fix it.
your unsubscribe
rule needs space between pattern , target more importantly need place these rules before catch-all index.php
rule. can combine 2 last rules one:
rewriteengine on rewritebase / rewriterule ^unsubscribe(?:\.php)?$ /template/adcf.org/newsletter/unsubscribe.php [l,nc] rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule . /index.php [l]
wiki
Comments
Post a Comment