 |

12-29-2007, 03:48 PM
|
 |
WebProWorld Member
|
|
Join Date: Jul 2007
Location: Ladysmith, BC, Canada
Posts: 50
|
|
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.
|

12-30-2007, 11:07 AM
|
|
WebProWorld Pro
|
|
Join Date: Dec 2007
Location: Brussels, Belgium
Posts: 110
|
|
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,...
|

12-30-2007, 12:35 PM
|
 |
WebProWorld Veteran
|
|
Join Date: Jan 2005
Location: Goshen, IN
Posts: 436
|
|
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..
A 302 redirect is a temporary redirect and shouldn't be used for any permanent solution for redirection..
|

12-30-2007, 03:25 PM
|
 |
WebProWorld Member
|
|
Join Date: Jul 2007
Location: Ladysmith, BC, Canada
Posts: 50
|
|
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.
|

12-30-2007, 04:16 PM
|
|
WebProWorld Pro
|
|
Join Date: Dec 2007
Location: Brussels, Belgium
Posts: 110
|
|
Re: Best home page redirection practice
Quote:
Originally Posted by PaulMycroft
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
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,...
|

01-02-2008, 06:22 PM
|
|
WebProWorld Veteran
|
|
Join Date: Jul 2003
Location: Spain
Posts: 335
|
|
Re: Best home page redirection practice
Quote:
Originally Posted by PaulMycroft
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?
|

01-06-2008, 04:15 PM
|
 |
WebProWorld Member
|
|
Join Date: Jul 2007
Location: Ladysmith, BC, Canada
Posts: 50
|
|
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.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|