FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


synonym of the main page: how to unite





oleszka
I have site http://www.example.com - 4 pr
but http://www.example.com/index.php is 3 pr
How I can make http://www.example.com and http://www.example.com/index.php like the same page? Now index.php is just like synonym.
Peterssidan
You should 301 redirect users from in http://www.example.com/index.php to http://www.example.com/. No links should go to http://www.example.com/

Dont forget to make the redirect to a 301! It's important for to make the searchengines understand that the pr should be past on to http://www.example.com/.

I think the best way to do this is mod_rewrite but you can do it in php as well.
oleszka
Thanx for reply. So I found this for case: www.mysite.com and mysite.com:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=permanent,L] .

but what I should write in my case (www.mysite.com and www.mysite.com/index.php where www.mysite.com is main)?
Peterssidan
I'm only a beginner on mod_rewrite but I tock a look at http://forum.modrewrite.com/ and found this:

Quote:

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^index\.php$ / [NC,R=301,L]

I have test it so it should work.
oleszka
GREAT!THANX! It really works. Just one thing: now it redirects from www.mysite.com/index.php to mysite.com so I added these two lines:
RewriteCond %{HTTP_HOST} ^mysite\.com
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=permanent,L]

is it ok? no problem for search engines?
Peterssidan
As I said before I'm a beginner on mod_rewrite so can't see how this two rules will work exactly. but I'm pretty sure you not should write "R=permanent" use a the number 301 instead.
As I see this the page can be redirected two times and I don't know how this will work with seo. no idea..

Maybe someone else could say their thoughts?
manumiglani
The 301 code will work fine and your pr will be concentrated on one page in the next pagerank update.
Related topics
Text color of main page
Broken link on main page
create a page of access in PHP?
Better Browser Support for Main Page
question : how to display random image in main page?
How can i make that intro page?
My main page doesnt load
Need help with a block on the main page.
Changed my main page....not showing
pulling data out of a database and putting it on main page
xoops main page
JScript Sliding Text Areas ( Adobe's main page sample)
Login link in the main page itself
[Bug | Improvment ] FriHOST Main Page | Game Development S.
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> SEO and Search Engines

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.