Routing to Homepage

How can I automatically route or direct people to my homepage when they type in the domain address? As it is now, when people type, they see the directory of my site rather than the homepage. Can they automatically be directed to my homepage without typing /home.htm ?

You need to name it index.htm index.html or index.php for people to see it automatically.

If you realy want it to be home.htm you could set up an index.php that was a redirect to home.htm.

home and .htm are both microsoft abnormalities that break with web tradition.


MP3Mystic Your personal Streaming MP3 Server
Dreamhost Hosting - Last one out, turn off the lights.

DH has pretty much everything anyone could come up with (page1.html?) in their DirectoryIndex directive. Assuming this information is still correct, home.htm should work fine. If it isn’t working, either the server configuration has changed, or there’s another problem going on, likely with the user’s site or file.

That said, I agree that the OP really should change it to the standard “index.html”. Otherwise the site may break if it’s moved to another web host in the future.

If you want useful replies, ask smart questions.

I have a similar question: I installed Wordpress to /mangyvarmit/[]/wordpress, but I would like visitors to not have to use the URL to get to it, just Can I use the sub-directory remap function to do that?

Yep. Just create an index.php file with only the following line in it (no blank lines) and upload it to your root (main) directory.

<?php header('Location:'); ?>-----------------
I don’t work here. I’m just your typical support forum volunteer.

For WordPress 1.5, just copy the index.php in /wordpress to the document root.

You’ll need to edit it though:

<?php /* Short and sweet */ define('WP_USE_THEMES', true); require('./blog/wp-blog-header.php'); ?>The important part is the require() function.


This path tells PHP to look in the current directory ( for the blog directory ( and load up the wp-blog-header.php

So yours might need to be

<?php /* Short and sweet */ define('WP_USE_THEMES', true); require('./wordpress/wp-blog-header.php'); ?>
Oh yeah, this makes it so all the links will be instead of, so you’ll need to update the WordPress configuration as well.
Options -> Blog address (URI) would be

:cool: Perl / MySQL / HTML CSS

Thanks very much for the replies.

I a bit scared that I will screw something up with other themes/plugins…someone else on another site suggested I just move the files/folders inside the wordpress DIR to the root, and change the Wordpress options accordingly.

Bah, maybe it’s not worth it.

If you’re just using the site for WP, why not just install it into the root directory instead of /wordpress?

Don’t make URIs rely on implementation details unnecessarily. What are you going to do if you switch to a different blog application down the road? Sure you can put redirections in place, but the URLs will still be incorrect or misleading even if they eventually get your readers to the right place.

Anyway, aliases/remappings really aren’t for doing this type of thing. MacManX’s suggestion is the easiest, but you can also accomplish the same thing by putting the following line in .htaccess at the root of your site:

Redirect /
If you want useful replies, ask smart questions.

As you can see there’s a reason I’m replying to a thread in the Beginner’s Forum :slight_smile:

I installed WP into the /wordpress directory basically because those were the instructions/suggestions (more or less) on the WP website.

Instead of a redirect, can I just copy all the folders/files to the root DIR and change the WP Options/General URI settings? Or would that potentially screw up existing links?