GoogleTap/code I changed HELPED ME rewrite index.php 2 html

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   GoogleTap/code I changed HELPED ME rewrite index.php 2 html
MrSandman
CZ Super Newbie
MrSandman has been a member for over 20 year's 20 Year Member
usa.gif florida.gif
Occupation: Website developer/designer + Chauffeur
Age: 53
Gender: Male
Fav. Sports Team: Chicago Bears (Sad but true...- cuz from Chicago!)
Status: Offline
Joined: Dec 16, 2003
0.01 posts per day
Posts: 58
Points: 5,833
 Yahoo Messenger  
I was having trouble with only one aspect of googletap
and that is the rewrite rule for index.php to index.html

I know that it is the long url that search engines don't like but what i wanted to do is rewrite index.php to index.html so I could get the most important page on my site indexed as an html page (much more well "liked" by the engines than pages with *.php extensions long or short and could not cannot figure out why it wouldn't work

I had lost google page rank points because the content from index.php was not getting indexed from instead only from the pages that I usedmod_rewrite successfully on (the links/modules links)


I kept asking myself and trying to figure out "Why does index.php not rewrite to index.html???"

I wanted to have a "virtual index.html" getting indexed that was the ACTUAL output from index.php

SO here is what I did
I just changed the code in my .htaccess file to read like this

RewriteEngine on
RewriteBase /
RewriteRule ^index\.html$ /index\.php


IT USED TO READ
just :
RewriteRule ^index.html index.php
THAT DID NOT WORK!


and of course in header.php

I wrote the $urlin and $urlout arrays like this:

for the urlin$

"'(?<!/)index.php'",

and for the urlout$

"index.html",

at the very bottom of my .htaccess file all it reads is:
DirectoryIndex index.php
which used to be at the top -doesnt really matter where it is top or bottom

but the object was and is now accomplished that if you type in [ Register or login to view links on this board. ]
the output is that from [ Register or login to view links on this board. ]

if you use google toolbar with page rank enabled you will notice that the index.php link has no rank while the index.html has a rank


end result - index.html (which technically and literally does not exist on the server) - will now get indexed by google and many other search engines if the link is actually called using a http request - like links etc. - I had to keep directory index as index.php though because if i didnt and you called the url [ Register or login to view links on this board. ] by itself and the directory index listed in my .htaccess file was index.html it display the actual directory listing not a webpage - I guess the way it works is that the default homepage must be a real page that actually exists! - so now I will simply create links on my php site that link to index.html and voila' I get the most important page on my site indexed!!!!!!



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum