Pagerank - Friendly url redirection

Spacemail by SpaceshipSpacemail by Spaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
Watch

shockie

VIP Member
Impact
189
i'm in the process of changing my filenames from blah.htm to differentBlah.php, but i currently have links from third parties going to blah.htm. my question is, how can i redirect the old files to their respective new files, or just to index.php, and properly keeping the pagerank flow?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Are the files just changing extension? Ie: blah.htm to blah.php ? If so, something like..

Code:
RewriteEngine On
RewriteRule ^(.*)\.htm$ $1.php [R=301,L]
 
0
•••
oops, didn't notice there was a reply :).

the files are changing extension along with filename, hence the blah.htm to differentBlah.php. unfortunately, there isn't much correlation from blah to differentBlah, so i wouldn't mind finding a solution that just sends pagerank (and visitors) from blah.htm to index.php.
 
0
•••
.
Code:
RewriteEngine On
RewriteRule ^(.*)\.htm$ /index.php [R=301,L]
Or, if you want to include the exact files:

Code:
RewriteEngine On
RewriteRule blah\.htm /index.php [R=301,L]
RewriteRule blah2\.htm /index.php [R=301,L]
#etc
 
1
•••
great thanks!!
 
0
•••
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
URLs.com
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back