This row will certainly cause a little collision as it will try to rewrite the goal itself:
RewriteRule ^/(.*)$ page.php?q=$1 [L,NC]
Now, how do I prevent this?
This row will certainly cause a little collision as it will try to rewrite the goal itself:
RewriteRule ^/(.*)$ page.php?q=$1 [L,NC]
Now, how do I prevent this?
Using a conditional Rewrite:
RewriteCond %{REQUEST_URI} !^page.php?
RewriteRule ^/(.*)$ page.php?q=$1 [L,NC]
Just add a condition that the matched string is not the same as the destination:
RewriteCond $1 !=page.php
RewriteRule ^/(.*)$ page.php?q=$1 [L]
Here the !=
in RewriteCond
indicates a negated lexicographic comparison instead of the implied regular expression comparison.