PDA

View Full Version : A little help with .htaccess


JJR512
07-28-2002, 02:22 AM
I know this isn't PHP or MySql, but didn't see a better place to put it, and hope someone can help.

I recently moved my forums to the root web level. They used to be in a subdir called forums (http://www.jjr512.com/forums), then I made a subdomain for that subdir so that http://forums.jjr512.com also worked. But now it's just http://www.jjr512.com.

Is there something I can put in my .htaccess file so that any requests for something in the /forums subdir gets redirected to the same file in the root dir? In other words, to redirect http://forums.jjr512.com OR http://www.jjr512.com/forums to http://www.jjr512.com.

mr e
07-28-2002, 06:18 PM
Well you could stick an index.php in the sub dir and put this code in it


header ("Location: h ttp://www.jjr512.com/");


without the space between the h and ttp...it's just a redirect, but it's easy

Logician
07-29-2002, 11:59 AM
have u checked that one?

https://vborg.vbsupport.ru/showthread.php?s=&threadid=40079&highlight=.htaccess

JJR512
07-29-2002, 07:32 PM
What I'm trying to do is redirect http://forums.jjr512.com to http://www.jjr512.com.

None of the redirect methods I've seen described for use in .htaccess seem to work. I've tried:

Redirect forums.jjr512.com/ http://www.jjr512.com/
and
Redirect http://forums.jjr512.com/ http://www.jjr512.com/

Neither of these works.

Logician
07-30-2002, 09:05 AM
Try this:

Redirect http://forums.jjr512.com http://www.jjr512.com

put this in your .htaccess file and PUT THIS file in your root dir.

Or try this:

Redirect / http://www.jjr512.com

put this in your .htaccess file and PUT THIS file in your forums.jjr512.com dir.

It should work.