![]() |
rewrite help
is it possible to create a rewrite rule so that if
http://www.host.com/imr/user?=user can actually be http://www.host.com/user ? Really need help understanding these rules Thanks, Arachn1d |
try
[PHP] if($_GET['user']) { header("Location: http://www.host.com/user"); } [/PHP] or if you want user in the url to be the user variable, you can use [PHP] if($_GET['user']) { header("Location: http://www.host.com/$_GET['user']"); } [/PHP] |
You can also do it using Apache's mod_rewrite although I can't give you exact code because the on time I tried to understand it I didn't get it. :(
You might try http://www.sitepoint.com/article/guide-url-rewriting http://www.phpfreaks.com/tutorials/23/0.php |
add a basic .htaccess to your web directory containing the following:
:
RewriteEngine On |
| All times are GMT -5. The time now is 4:35 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC