Melvinivitch
asked on
SEO: Using .htaccess to redirect www-root directory to www/home/
I want to know if the following is terrible or not with respect to SEO:
I have a small-site, structured in a pretty standard way: each page has its own directory off of the www root directory. I have a navigation bar file (located at the www root) that I include via php-includes on each page. My directory structure makes the nav-bar's references nice and simple. I have these pages:
www/home/index.php
www/about/index.php
www/contact/index.php
My nav-bar file looks like this:
<a href="../home/index.php">H ome</a>
<a href="../about/index.php"> About</a>
<a href="../contact/index.php ">Contact Us</a>
Then I just use a <?php include("../navBar.php"); ?> statement on each page to include my nav-bar.
But when someone navigates to http://www.mydomain.com/ , I need them to end up at www/home/index.php. So, at the root of the site (ie, the www directory), I have a .htaccess file that redirects to the home directory via the following line:
DirectoryIndex ./home/index.php
So what are the implications of that design with respect to search-engine friendliness?
I have a small-site, structured in a pretty standard way: each page has its own directory off of the www root directory. I have a navigation bar file (located at the www root) that I include via php-includes on each page. My directory structure makes the nav-bar's references nice and simple. I have these pages:
www/home/index.php
www/about/index.php
www/contact/index.php
My nav-bar file looks like this:
<a href="../home/index.php">H
<a href="../about/index.php">
<a href="../contact/index.php
Then I just use a <?php include("../navBar.php"); ?> statement on each page to include my nav-bar.
But when someone navigates to http://www.mydomain.com/ , I need them to end up at www/home/index.php. So, at the root of the site (ie, the www directory), I have a .htaccess file that redirects to the home directory via the following line:
DirectoryIndex ./home/index.php
So what are the implications of that design with respect to search-engine friendliness?
In terms of SEO, the proper way to do it is to make sure that you are using a permanent/301 redirect to redirect to your desired home directory/page.
ASKER
Ok, I'll do that.
Just curious, though - what are the ramifications of doing it the way I outlined above?
Just curious, though - what are the ramifications of doing it the way I outlined above?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.