views:

36

answers:

1

Is it possible to set a default folder to access instead of a file like "index.html".

What I'd like to to is make it so that when a person visits my site they get redirected to a folder within the root of the domain. I am using a blogging engine and I need it to show up as the homepage but I don't want to install it in the root because I have other folders and files that need to be in the root directory. And I don't want to put them inside the blogging software's folder. I also don't want to use a 301 or 3XX redirect for SEO purposes.

If there's a way to do what I'm asking let me know. If not, let me know the best option otherwise.

+1  A: 

Try this mod_rewrite rule:

RewriteEngine on
RewriteRule ^$ foo/bar [L]

This will rewrite requests to the directory where this rule is applied to to foo/bar. So if you put this rule in the .htaccess file in your document root and request http://example.com/, it will get rewritten to http://example.com/foo/bar.

Gumbo