Jump to content

help with .htaccess


anarchoi

Recommended Posts

ok here is my situation:

 

i have a forum where url's looks like http://www.mysite.com/forums/viewforum.php?f=16

 

Since i now have subdomains, i changed the part in bold so the url's now looks like this:

http://forums.mysite.com/viewforum.php?f=16

 

 

the problem is that a lot of my members have bookmarked the old address (http://www.mysite.com/forums/) and are now having problem with cookies since the url in my config is set to forums.mysite.com

 

i'd like to redirect anyone who access mysite.com/forums/**** to the new url @ forums.mysite.com/****

 

BUT is it possible to redirect them to the SAME PAGE they were on and NOT just redirect them to the root of www.mysite.com/forums/

so they don't loose the page they were currently viewing

 

example:

http://www.mysite.com/forums/viewforum.php?f=16

would redirect to

http://forums.mysite.com/viewforum.php?f=16

and NOT TO:

http://forums.mysite.com/

 

 

i'm a newbie with htaccess, so could someone please give me a working code that would do that?

thanks a lot!!!

Link to comment
https://forums.phpfreaks.com/topic/92595-help-with-htaccess/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.