Answer the question
In order to leave comments, you need to log in
How to specify mod_rewrite exceptions?
Links like site.ru/index.php?type=value will be converted to site.ru/value. Is it possible to make exceptions for some value and use a different rule for them?
Answer the question
In order to leave comments, you need to log in
If I understand the task correctly, then you will not convert the first into the second, but just the opposite - you will convert the context / value into passing the GET parameter type with the value value to the index.php script
For individual values (in this case) you can write: So:
RewriteEngine On
RewriteRule ^contacts$ contacts.php [L]
RewriteRule ^about$ about.php [L]
RewriteRule ^([a-zA-Z0-9_/-]+)$ index.php?type=$1 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question