In this question, someone asked if it were possible to do a certain type of url rewriting without access to the php file. (see the question for more info.) How do I too this with access to the php file?
Asked
Active
Viewed 106 times
-1
-
I have no idea what you are asking. – Jon Lin Jul 20 '12 at 02:05
-
How can we possibly know what you are trying to do when you don't say how **you** would like the URLs to be rewritten? – jprofitt Jul 20 '12 at 02:25
1 Answers
0
You can use this for your htaccess file:
RewriteEngine on
RewriteBase /
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php
It just means, rewrite any requests that don't end in js, ico, txt, gif, jpg, png, or css to your index.php file. In index.php, you can access any parameters using $_SERVER['REQUEST_URI']
and parse it as needed.

Thomas Fussell
- 458
- 3
- 9