PDA

View Full Version : Transparent redirect


Carlos
01-03-2006, 02:37 PM
Greetings,

There is a way -useful snippet code maybe?- to do transparent page redirects with php? What i want to do is to have a url like this:

www.10iguales.com/blogs/username

That redirect the browser to

http://www.10iguales.com/index.php?option=com_mamblog&task=show&action=user&id=username

So is like having a script like redirect.php?variable=username, but i dont want to show the php script name, nor any explicit trail of scripting. Just transparent. Any ideas?

Carlos

Carlos
01-04-2006, 12:22 PM
ok, so i found it. It's really simple. Just go and edit your .htaccess file and add something like this:

RewriteRule ^directory/?(.*)$ /ugly/url/script.php?option=blabla&id=$1 [L,QSA]

That should make http://www.domain.com/directory/username point to http://www.domain.com/ugly/url/script.php?option=blabla&id=username