?
Solved

SEO: Using .htaccess to redirect www-root directory to www/home/

Posted on 2007-11-25
3
Medium Priority
?
698 Views
Last Modified: 2012-06-27
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">Home</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?
0
Comment
Question by:Melvinivitch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 33

Expert Comment

by:humeniuk
ID: 20345884
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.
0
 

Author Comment

by:Melvinivitch
ID: 20345986
Ok, I'll do that.

Just curious, though - what are the ramifications of doing it the way I outlined above?
0
 
LVL 33

Accepted Solution

by:
humeniuk earned 2000 total points
ID: 20346369
The purpose of the permanent redirect is to pass the value of incoming links to the destination page - incoming links are one of the most important ranking factors for the major search engines.  A permanent redirect - one that returns a 301 http code - is the most reliable way to do this.

If you do not specify, then it is regarded as a temporary (302) redirect and the search engines are less inclined to pass the value of those links to a temporary redirection/page.  Having said that, the SE's have gotten better at recognizing long term 302's as being essentially the same as 301's, but it's better to do it right from the beginning.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question