Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Pagerank - Friendly url redirection

Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
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
Close
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
Close
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
Close
.
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
Close
great thanks!!
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back