Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-07-2010, 09:06 AM   #1
daveylapoo
Confirmed User
 
Join Date: Dec 2003
Posts: 423
index.html -> index.php 301 redirect question

I've got a nice SE placement in yahoo, but they've indexed the www.sitename.com/index.html url, and I am in the process of making the site dynamic so the new homepage url will be www.sitename.com/index.php.

I was wondering how I could do a proper server side redirect using .htacess / 301 redirects as opposed to a meta refresh. I've googled different ways of doing it but none function properly.

Thanks in advance to any who can help out!
daveylapoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2010, 09:11 AM   #2
ArsewithClass
So Fucking Banned
 
Industry Role:
Join Date: Mar 2007
Location: UK
Posts: 7,957
Quote:
Originally Posted by daveylapoo View Post
I've got a nice SE placement in yahoo, but they've indexed the www.sitename.com/index.html url, and I am in the process of making the site dynamic so the new homepage url will be www.sitename.com/index.php.

I was wondering how I could do a proper server side redirect using .htacess / 301 redirects as opposed to a meta refresh. I've googled different ways of doing it but none function properly.

Thanks in advance to any who can help out!
Could you not use the index with an enter here to link to a .php page!? I thought that most sites need a landing page thats pretty clean anyway. This way, nothing would change.
ArsewithClass is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2010, 09:13 AM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,262
or you could use modrewrite so you could alias index.html as index.php

i do this for tgp submissions that dont allow .php extensions that my gallery program creates.

so http://www.domain.com/index.php would work as http://www.domain.com/index.html

or in my case

http://www.domain.com/galleries/fuc/...sold/index.php

would work as

http://www.domain.com/galleries/fuc/...old/index.html

Code:
Options +FollowSymLinks 
RewriteEngine On 
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteCond %{REQUEST_URI} ^(/.+\.)html$ [NC] 
RewriteCond %{DOCUMENT_ROOT}%1php -f 
RewriteRule \.html$ %1php [NC,QSA,L]
hope that helps
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2010, 09:35 AM   #4
daveylapoo
Confirmed User
 
Join Date: Dec 2003
Posts: 423
Thanks for the responses.

Looks like both of those will work; however, as I understand it the 'proper' way to do this involves the 301 / .htaccess redirect, as it should not affect your SE listings:

http://www.google.com/support/webmas...n&answer=93633

This is the code as it exists in the .htaccess now:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
RewriteRule index\.html index.php [NC,R]

The last line is what should do it, however i think that something preceding this is causing the issue.
daveylapoo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-07-2010, 09:41 AM   #5
Jdoughs
Confirmed User
 
Jdoughs's Avatar
 
Industry Role:
Join Date: Mar 2004
Location: Great White North
Posts: 5,794
A 301 done properly will do exactly what you want. All ranking factors will be passed on accordingly to the 301'd page. (as long as you do it properly, this is not a tactic to rank new pages, only for 'moving' pages).

Google (and yahoo should) will follow the command of the 301 and consider all weight to the "Permanently Moved" url to the new url.

Save yourself some future grief, and never, link to the index.html, OR index.php. and link to the folder/directory. I wouldnt 301 it to the new index.php, I would 301 it to the sitename.com/ directory index. (then it wont matter what kind of index you use today, or in 10 years.
__________________
LinkSpun - Premier Adult Link Trading Community - ICQ - 464/\281/\250
Be Seen By New Webmasters/Affiliates * Target out webmasters/affiliates based on niches your sites are for less than $20 a month.
AmeriNOC - Proudly hosted @ AmeriNOC!
Jdoughs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.