GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   301 Redirect - How To Get Rid of /index.php (https://gfy.com/showthread.php?t=700783)

c-lo 01-29-2007 03:07 PM

301 Redirect - How To Get Rid of /index.php
 
So I've changed all my site's pages from .html to .php...but now when I go to my domain I can't just access blah.com, instead it displays blah.com/index.php. How can I change this to simply hide the /index.php and still have no interference/suspicion from the SE's? What need I add to the .htaccess?

Thanks,
c-lo

c-lo 01-29-2007 04:04 PM

Nothing? Wump wow.

who 01-29-2007 04:05 PM

you have absolutely no reason to do so. if the SE spider is indexing blah.com/index.php then that's what it's indexing.

96ukssob 01-29-2007 04:08 PM

i belive this should work...

Code:

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

you might have /index.php in your htaccess already

c-lo 01-29-2007 04:41 PM

Quote:

Originally Posted by who (Post 11814227)
you have absolutely no reason to do so. if the SE spider is indexing blah.com/index.php then that's what it's indexing.

Well my domain (blah.com) is a PR3 while the /index.php is a PR0. I'm afraid my PR will decrease if I keep it the way it is...even though I have a 301 from the old index page to the new php one.

That, plus I think it looks better without the /index.php.

Thanks for the help. I'm about to give what you suggested a try, bossku69.

c-lo 01-29-2007 05:03 PM

Hmm it isn't working for me, bossku...any other ideas? It's really fucking pissing me off.

who 01-29-2007 05:06 PM

Quote:

Originally Posted by c-lo (Post 11814460)
Well my domain (blah.com) is a PR3 while the /index.php is a PR0. I'm afraid my PR will decrease if I keep it the way it is...even though I have a 301 from the old index page to the new php one.

That, plus I think it looks better without the /index.php.

Thanks for the help. I'm about to give what you suggested a try, bossku69.

No no no man you're making a mistake. The PR for the default page will hold, it may take a week to change but it WILL change. THat's not a PR update it's just when GG switches your index listing to the index.php file.

If you fiddle with redirects you'll get fucked on by GG penalties.

c-lo 01-29-2007 05:15 PM

I thought 301 redirects were SE friendly? I think I get what you're saying. It may take some time but the index.php page will eventually reflect the .com's PR?

Thanks again,
c-lo

mikeyddddd 01-29-2007 05:15 PM

DirectoryIndex index.php index.html

will cause index.php to be the first page loaded, if it's not there there then index.html will be loaded.

index.php has PR0 because you have been linking to the default page (probably index.html). Changing the DirectoryIndex will allow index.php to assume the PR of the default page.

your-domain.com/ = PR
your-domain.com/index.php = No PR

mikeyddddd 01-29-2007 05:21 PM

Don't redirect to index.php. Just put DirectoryIndex line in .htaccess

c-lo 01-29-2007 05:22 PM

One last thing, I have (in htaccess)
/index.html http://www.domain.com/index.php

Do I also need something such as
http://www.domain.com http://www.domain.com/index.php
to help redirect the search engines?

I ask because before I switched to .php pages, if you typed my domain with /index.html it would show PR0.

c-lo 01-29-2007 05:29 PM

Awesome, I think that fixed it, mike. Thanks to everyone for the help. Between this and .xxx I was about to kill someone.

later
c-lo

mikeyddddd 01-29-2007 05:39 PM

You're welcome.

your-domain.com/index.html and your-domain.com/index.php are each considered different than your-domain.com/ and won't have PR unless you link to them specifically.

your-domain.com is even different than your-domain.com/.


All times are GMT -7. The time now is 09:33 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123