Forum Moderators: phranque

Message Too Old, No Replies

aliasing the root domain to subfolder

         

spiralstarez

9:02 pm on Jun 21, 2007 (gmt 0)

10+ Year Member



Hi, I've been surfing but haven't quite found what I am looking for.

Because I'm developing wordpress for a client and wanted a testing ground, I developed it under: www.thedomain.com/wordpress/

In the cms, all the links in the database have /wordpress/ at the end of them, so rather than changing them all, I want to do something in htaccess that masks the root / to /wordpress/ without exposing that to the user.

Is this easy? I was looking at the alias directive, but am not very familiar with how to do it.

jdMorgan

4:36 am on Jun 22, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To clarify: The links on your pages define the "real" URL and that is what the user will see. Nothing can change that. And the locations of files on the server always differ from those implied by a URL -- For example, the server must add a disk path, an Apache subdirectory, and usually something like htdocs and possibly an account name to the URL-path in order to form the filepath. So URLs and filepaths are never the same, and code on the server can make them a little more different than they were, but it cannot 'change' a URL, because URLs are defined on pages, not in the URL-to-filename translator that is a server.

For the sake of posterity, if I were you, I would run a search-and-replace on the database and have done with it. Otherwise, you (or someone) will have to deal with unnecessary complications and (possibly) sub-optimal search engine listings for a long, long time.

Jim