WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-29-2007, 03:48 PM
PaulMycroft's Avatar
WebProWorld Member
 

Join Date: Jul 2007
Location: Ladysmith, BC, Canada
Posts: 50
PaulMycroft RepRank 1
Default Best home page redirection practice

What is the best way to redirect my default /index.php page to the actual home page, located in a directory?

e.g. www.domain.com/index.php to www.domain.com/home/

I have added a 301 redirect in my .htaccess file but to actually MAKE the visitor go to the home page in the /home/ directory, I have a meta refresh on /index.php.

Any advice is much appreciated.
__________________
All the best,
Paul Mycroft
Professional Web Design
Reply With Quote
  #2 (permalink)  
Old 12-30-2007, 11:07 AM
WebProWorld Pro
 

Join Date: Dec 2007
Location: Brussels, Belgium
Posts: 110
Jean-Luc RepRank 1
Default Re: Best home page redirection practice

It is not good for SEO to redirect the home page. It would be better to make the content of www.domain.com/home/ available at www.domain.com/ without redirect.

I am aware that some applications force you to put the home page in a subdirectory. If you cannot avoid this, use a 302 redirect from www.domain.com/ to www.domain.com/subdirectory/. I would avoid JavaScript and META "refresh" as they have no clear meaning in SEO terms.

Jean-Luc
__________________
Checking redirects is now as easy as 1 2 3, even if you are not a HTTP-header guru !
AWStats Support: installation assistance, add-on's, extra sections, dedicated forum,...
Reply With Quote
  #3 (permalink)  
Old 12-30-2007, 12:35 PM
Feydakin's Avatar
WebProWorld Veteran
 

Join Date: Jan 2005
Location: Goshen, IN
Posts: 436
Feydakin RepRank 2
Default Re: Best home page redirection practice

Why would you put your first level content one directory low?? It just doesn't make any sense to me..

That said, a simple 301 is the best solution for this problem.. If you have access to your .htaccess file you can do it there with this command..

Quote:
Redirect 301 /index.php http://www.domain.com/home
A 302 redirect is a temporary redirect and shouldn't be used for any permanent solution for redirection..
__________________
Steve : Custom Jewelry | Internet Marketing
Reply With Quote
  #4 (permalink)  
Old 12-30-2007, 03:25 PM
PaulMycroft's Avatar
WebProWorld Member
 

Join Date: Jul 2007
Location: Ladysmith, BC, Canada
Posts: 50
PaulMycroft RepRank 1
Default Re: Best home page redirection practice

Hi there,

Thanks for your responses!

My home page is in the /home/ directory because my blog software required a directory. My home page has a blog integrated:

Professional Web Design | Email Newsletters | Search Engine Optimization

My .htaccess file already has the following code:

. . . .
redirect 301 /index.html Professional Web Design | Email Newsletters | Search Engine Optimization

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^paulmycroft.com [NC]
RewriteRule ^(.*)$ http://www.paulmycroft.com/$1 [L,R=301]
. . . .

Should I remove the meta refresh from the /index.html file and leave the 301 in place in the .htaccess file? Should I do a 301 redirect at the domain level in GoDaddy or on the server in the .htaccess file, as I have outlined?

TIA.
__________________
All the best,
Paul Mycroft
Professional Web Design
Reply With Quote
  #5 (permalink)  
Old 12-30-2007, 04:16 PM
WebProWorld Pro
 

Join Date: Dec 2007
Location: Brussels, Belgium
Posts: 110
Jean-Luc RepRank 1
Default Re: Best home page redirection practice

Quote:
Originally Posted by PaulMycroft View Post
My home page is in the /home/ directory because my blog software required a directory.
Isn't it a WordPress blog ? I often install WordPress blogs in the "main" directory.

Quote:
Originally Posted by PaulMycroft View Post
Should I remove the meta refresh from the /index.html file
Why do you need an index.html ? If it is not there, your Apache server will start from the index.php by default.

Jean-Luc
__________________
Checking redirects is now as easy as 1 2 3, even if you are not a HTTP-header guru !
AWStats Support: installation assistance, add-on's, extra sections, dedicated forum,...
Reply With Quote
  #6 (permalink)  
Old 01-02-2008, 06:22 PM
WebProWorld Veteran
 

Join Date: Jul 2003
Location: Spain
Posts: 335
computergenius RepRank 1
Default Re: Best home page redirection practice

Quote:
Originally Posted by PaulMycroft View Post
What is the best way to redirect my default /index.php page to the actual home page, located in a directory?

e.g. www.domain.com/index.php to www.domain.com/home/

I have added a 301 redirect in my .htaccess file but to actually MAKE the visitor go to the home page in the /home/ directory, I have a meta refresh on /index.php.

Any advice is much appreciated.
You wouldn't need a meta refresh if the 301 was working.

In your first post, you said that you wanted to 301 index.php to home.

But in a later post, you said that your htaccess redirected index.HTML (not php) to home

Which is it?
__________________
Pete Clark
Advertise events locally in Spain for free - http://hotcosta.com/events.php
Reply With Quote
  #7 (permalink)  
Old 01-06-2008, 04:15 PM
PaulMycroft's Avatar
WebProWorld Member
 

Join Date: Jul 2007
Location: Ladysmith, BC, Canada
Posts: 50
PaulMycroft RepRank 1
Default Re: Best home page redirection practice

Hi Pete,

I actually had both in place but wasn't sure which one to use.

I have removed the meta refresh from /index.html and applied a 301 from that page to index.php in my /home/ directory instead.

I believe that this is the correct way to implement this.

TIA.
__________________
All the best,
Paul Mycroft
Professional Web Design
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Home page Dynamic Vs Html static page Steven1976a Search Engine Optimization Forum 4 05-27-2007 06:10 PM
Home Page Link On Page Rank 6 Real Estate Forum kelouba Ad Space Buy and Sell 1 11-23-2006 12:34 PM
Google Personalized Home Page Graduates To, Well, A Home Pa WPW_Feedbot Search Engine Optimization Forum 0 09-14-2005 03:30 PM
Redirection page but still #1 in Google? joe_en Google Discussion Forum 1 01-26-2005 08:28 PM
Problem with PHP Redirection and Google Page Rank? Rohit_Malhotra Google Discussion Forum 0 10-28-2004 04:11 AM


Search Engine Optimization by vBSEO 3.2.0