DreamHost Web Hosting
Discussion Forum


Forums
   >> Beginner's Forum
Flat Mode*

Subject Re: WordPress in subdir -redirect from home dir [re: AndrewStout]  
Posted byrlparker (DH DreamMaster!)
Posted on09/05/07 02:11 AM


Andrew,

I wasn't able to find a "clean" way to do this via a redirect without munging up the existing WordPress directory's .htaccess file and rewrite rules. I *don't * think that is what you want to do, as it would be a bit of a mess to change it back if you decided to use your http://yourdomain.tld/ page for something else at a latter time and needed your blog to *then* be "intact" at http://yourdomain.tld/.

This experience *did* jog my memory though; remembering having set up a client like this once before and a trip to the WP codex reminded me how I did what are are trying to do.

With slight modifications (since you already have a functioning blog at http://yourdomain.tld/blog/), you can use the process detailed in the WP Codex article on "Giving WordPress Its Own Directory" to leave you blog functioning at it's present location, but have it reached from http://yourdomain.tld/.

Essentially, you are making a couple of changes in the WordPress backend (describing the new "WordPRess root"), and putting *copies* of WP's index.php and .htaccess in the "root" directory of your site. You need to then edit that "root" copy of index.php,to correct the path for the header include.

Basically, you are following the instructions in the article, except you do not need to do steps 1,3, and 6 (your files are already there.)

This ought to do what you want, and is pretty easy to reverse if you ever want to change your site structure *back* - Just "reverse" the process in the WP backend and delete the index.php and .htaccess in your "root" directory.

You *may* need to manage some content redirects if the new permalinks create a problem for you with inbound links - but there are WP plugins to help with that, if need be.

Again, I apologize for the incorrect direction I gave re the redirect permanent; this process, however, *does* work (I've have done it) and this is how WordPress says it should be done.

--rlparker




 
Entire thread
Subject  Posted byPosted on
*redirect to subdir  AndrewStout09/03/07 09:46 PM
.*Re: redirect to subdir  AndrewStout09/03/07 11:05 PM
.*Re: redirect to subdir  rlparker09/03/07 11:09 PM
.*Re: redirect to subdir  rlparker09/03/07 10:42 PM
.*Re: redirect to subdir  AndrewStout09/04/07 08:06 PM
..Re: WordPress in subdir -redirect from home dir  rlparker09/05/07 02:11 AM
.*Re: redirect to subdir  rlparker09/04/07 08:34 PM
.*Re: redirect to subdir  AndrewStout09/05/07 09:07 AM
.*Re: redirect to subdir  rlparker09/05/07 01:51 PM
.*Re: redirect to subdir  AndrewStout09/03/07 11:07 PM
.*Re: redirect to subdir  rlparker09/03/07 11:14 PM
Jump to