Redirect to a sub folder


#1

Hi,

My hosted site is www.satishrao.com, however my wordpress blog is in the blog subdirectory in the root folder. So the blog site is www.satishrao.com/blog.

The main site has a quickstart.html which basically is provided by dreamhost and has pointers to panel, this forum etc…

How do I redirect all requests for www.satishrao.com to www.satishrao.com/blog

I have tried .htaccess, however that goes into some kind of indefinite loop. Please help.


#2

Use the RedirectMatch directive to redirect requests for http://www.satishrao.com/ to http://www.satishrao.com/blog/


#3

in your htaccess file I’m guessing you put something like

Redirect 301 / http://www.satishrao.com/blog

and it crapped out right? I had the same problem when I tested it (but that does work for a sub-domain… just not a sub-directory apparently).

Redirect 301 /index.php http://www.satishrao.com/blog

That should work.


#4

Just in case anyone else is having this problem and comes across this thread, I finally got the redirect to work by creating an index.php file for the root directory /home/user/arislondon.com/ that contains the following:

<?php header('Location: http://arislondon.com/blog'); exit; ?>

It’s important nothing comes before these lines; otherwise you’ll get an error.


#5

The 301 redirect is preferable as you keep your search engine rankings. True some people may not care about that… but I personally think its important.


#6

More…url redirecting samples

Crow