Is it possible to make the URL index.php?view=something back into /something?
Asked
Active
Viewed 101 times
-1
masegaloeh
- 18,498
Kyle
- 562
1 Answers
2
RewriteCond %{QUERY_STRING} [&?]view=([^&]*)
RewriteRule index.php$ /%1
Note that, if you're not careful, a crafty attacker might be able to abuse this; for example, by generating arbitrary URIs by passing parameters to "view". Appropriate precautions should be taken.
Also, you might want to append an [L], [R], or [R=301] to the RewriteRule (or a combination thereof), depending on your exact intent.
BMDan
- 7,379