Current time: 08-18-2017, 05:37 AM Hello There, Guest! (LoginRegister)

Post Reply 
Redirect to a sub folder
03-17-2011, 08:32 PM
Post: #1
Redirect to a sub folder
Hi,

My hosted site is http://www.satishrao.com, however my wordpress blog is in the blog subdirectory in the root folder. So the blog site is http://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 http://www.satishrao.com to http://www.satishrao.com/blog

I have tried .htaccess, however that goes into some kind of indefinite loop. Please help.
Find all posts by this user
Quote this message in a reply
03-17-2011, 08:45 PM
Post: #2
RE: Redirect to a sub folder
Use the RedirectMatch directive to redirect requests for http://www.satishrao.com/ to http://www.satishrao.com/blog/

Customer since 2000 Cool openvein.org | Please don't feed the trolls. Angry
Visit this user's website Find all posts by this user
Quote this message in a reply
03-18-2011, 04:43 AM
Post: #3
RE: Redirect to a sub folder
(03-17-2011 08:32 PM)satishrao Wrote:  How do I redirect all requests for http://www.satishrao.com to http://www.satishrao.com/blog

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

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.

http://www.marciesgifts.com
PM for manual CMS(drupal,joomla,etc)/Blog(WP,MT,etc
)/forum(phpbb,smf,etc) install/transfer $75.
$25 Off w/promo code SPRINKLES
Visit this user's website Find all posts by this user
Quote this message in a reply
09-15-2011, 11:00 AM
Post: #4
RE: Redirect to a sub folder
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.
Find all posts by this user
Quote this message in a reply
09-16-2011, 08:24 AM
Post: #5
RE: Redirect to a sub folder
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.

http://www.marciesgifts.com
PM for manual CMS(drupal,joomla,etc)/Blog(WP,MT,etc
)/forum(phpbb,smf,etc) install/transfer $75.
$25 Off w/promo code SPRINKLES
Visit this user's website Find all posts by this user
Quote this message in a reply
05-18-2017, 10:55 PM
Post: #6
RE: Redirect to a sub folder
More...url redirecting samples

Crow
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: