Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Search Engines > Google Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Google Discussion Forum Google Discussion forum is for topics specifically related to Google. There is a subforum dedicated to AdSense/AdWords subjects.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-20-2004, 11:06 AM
WebProWorld New Member
 

Join Date: Oct 2004
Posts: 7
Rohit_Malhotra RepRank 0
Default How to Redirect .php pages to .html page? How to continue sa

Hi,

I am planing to change our .php pages in .html pages. I have used a simple code :
<?php
header("location:http://www.________.com/____.html");
exit;
?>
to redirect my .php page. I mentioned following code at the top of the .php page and successfull redirected.
But after this process I lost my Google Page Rank. When I search some tutorial regarding this problem, I found to make some changings with .htaccess file, and .htaccess file, I can see in Root folder on sever but I did'nt get .htaccess file in root directory. Now How can we create a .htaccess file and How will I configured this with redirection of Google Page Rank. What will be the proper step by step process to use 301 Redirection method and to get our Google page Rank Back?
__________________
Rohit Malhotra
Daffodil Software Ltd.
rohit.malhotra@daffodildb.com
Reply With Quote
  #2 (permalink)  
Old 10-20-2004, 06:38 PM
WebProWorld 1,000+ Club
WebProWorld Moderator
 

Join Date: May 2004
Location: Austin, TX
Posts: 1,331
jestep RepRank 0
Default

Here is what I do if you're just redirecting to a new page.

Code:
<?PHP 
header("HTTP/1.1 301 Moved Permanently"); 
header ('Location: http://www.newsite.com/newpage.html'); 
exit (); ?>
Make sure you have the 301 message for google. Page rank is not immediate, but it should be transfered along with any backlinks in an update or two.
Reply With Quote
  #3 (permalink)  
Old 10-20-2004, 06:44 PM
WebProWorld New Member
 

Join Date: Aug 2004
Location: California
Posts: 22
osnet RepRank 0
Default Re: How to Redirect .php pages to .html page? How to continu

Quote:
Originally Posted by Rohit_Malhotra
What will be the proper step by step process to use 301 Redirection method and to get our Google page Rank Back?
I know 301 redirects are preferred over some other types of redirects like javascript & meta redirects.

I recommend using mod_rewrite and a proxy redirect. This preserves PR without having redundant files etc.
Code:
# -Rewrite Rules
RewriteEngine On
RewriteRule ^/$ /page.php?p=home [P,L]
RewriteRule ^index\.html /page.php?p=home [P,L]
RewriteRule ^index\.htm /page.php?p=home [P,L]
RewriteRule ^(.*)\.htm$ /page.php?p=$1 [P,L]
I had the opposite problem, alot of legacy html content, and I wanted it to be PHP pages, so the navigation & presentation could be optimized and consistent.

Please post your php URLs and someone may be able to assist further. blank out the domain name if you wish, but leave rest of it.

Cheers!
-John
Reply With Quote
  #4 (permalink)  
Old 10-21-2004, 02:21 AM
WebProWorld New Member
 

Join Date: Oct 2004
Posts: 7
Rohit_Malhotra RepRank 0
Default

Thanks All,

I have done what I wants with. Good Help. But one more thing which I want to Discuss If I use Moved Permanently In my Redirect code, that means I am moving my page permanently. But my question is, is there any way to Get back same process after Permanently Moving. I mean if I dont want to move my page permanently, can i Remove this process? I have moved my php page permanently but now I dont want to move that perticular page. What shuld I do?

Thanks
Rohit
Reply With Quote
Reply

  WebProWorld > Search Engines > Google Discussion Forum
Tags: , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0