Log in

View Full Version : Redirection


Elmer
08-09-2005, 01:29 PM
I need to make a redirect using the variable _SERVER["REQUEST_URI"]
this is to grab the url the user request and then use it to redirect the users to the new forums and to the page requested.

I need to know wich file shoul i edit, cause doing it in the index.php doesn't make any effect. perhaps global.php?

Thanks

Andreas
08-09-2005, 01:50 PM
mod_rewrite?

Elmer
08-09-2005, 02:03 PM
mod_rewrite
Don't know what exactly is mod_rewrite... I'm not a codder but just though that i could figure out how to make a redirect using the above function.
I just changed domain and need to redirect people to the new but letting them get exactly the page they wanned.

If you have suggestions, they are very wellcome.

Boofo
08-09-2005, 05:20 PM
He means in your htaccess file. ;)

Elmer
08-09-2005, 10:32 PM
He means in your htaccess file.
How could I do that?

I need help on this :(

is there a way to know the requested url from a user? let say a url like www.site.com/forum/showthread.php?t=322 (http://www.site.com/forum/showthread.php?t=322)

and redirect him to
www.site2.com/forum/showthread.php?t=322 (http://www.site2.com/forum/showthread.php?t=322)

safiel
08-10-2005, 01:23 AM
<a href="http://httpd.apache.org/docs/2.0/misc/rewriteguide.html" target="_blank">http://httpd.apache.org/docs/2.0/misc/rewriteguide.html</a>

Elmer
08-10-2005, 01:40 AM
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

I got it working this way

redirect permanent /foros/index.php http://asdf.com/foros/index.php
redirect permanent /foros/foros.php http://asdf.com/foros/foros.php
redirect permanent /foros/showthread.php http://asdf.com/foros/showthread.php
redirect permanent /foros/forumdisplay.php http://asdf.com/foros/forumdisplay.php
redirect permanent /foros/member.php http://asdf.com/foros/member.php
redirect permanent /foros/arcade.php http://asdf.com/foros/index.php
redirect permanent /foros/chat.php http://asdf.com/foros/chat.php
redirect permanent /foros/member.php http://asdf.com/foros/member.php
redirect permanent /foros/calendar.php http://asdf.com/foros/calendar.php
redirect permanent /foros/search.php http://asdf.com/foros/search.php


I had to add a line for every file.php hmm