[WebDNA] Re: [OT] - .php to .html redirect in .htaccess

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 101954
interpreted = N
texte = Nevermind. Got it. Options +Indexes Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule ^(.*)\.php$ $1.html [R=3D301,L] -Dan On Sun, 08 Feb 2009 13:53:19 -0800 "Dan Strong" wrote: > Anybody know off the top of their head how to do this? I have about 150= + files which used to be=20 >called whatever.php which have now been changed to whatever.html. When o= ld search engine links=20 >and bookmarks go to whatever.php they will now get a 404 of course. I wa= nt them to be 301=20 >redirected to whatever.php instead. >=20 > I know how to do this on a "1-to-1" basis: >=20 > ------------------- > RewriteEngine On > Redirect 301 whatever.php whatever.html > ------------------- >=20 > I could even do a [listfiles] to write the .htaccess file for me, but I= don't want to have to do=20 >it 150 times... I know there's a simple way to do it. I am googling now,= but if anybody knows and=20 >wants to share, I thank you in advace. > -Dan >=20 Associated Messages, from the most recent to the oldest:

    
Nevermind. Got it. Options +Indexes Options +FollowSymLinks RewriteEngine on RewriteBase / RewriteRule ^(.*)\.php$ $1.html [R=3D301,L] -Dan On Sun, 08 Feb 2009 13:53:19 -0800 "Dan Strong" wrote: > Anybody know off the top of their head how to do this? I have about 150= + files which used to be=20 >called whatever.php which have now been changed to whatever.html. When o= ld search engine links=20 >and bookmarks go to whatever.php they will now get a 404 of course. I wa= nt them to be 301=20 >redirected to whatever.php instead. >=20 > I know how to do this on a "1-to-1" basis: >=20 > ------------------- > RewriteEngine On > Redirect 301 whatever.php whatever.html > ------------------- >=20 > I could even do a [listfiles] to write the .htaccess file for me, but I= don't want to have to do=20 >it 150 times... I know there's a simple way to do it. I am googling now,= but if anybody knows and=20 >wants to share, I thank you in advace. > -Dan >=20 "Dan Strong"

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[UPPERCASE] (1997) Can't find templaes (1997) Interesting speed comparison .. (2003) searching by date (1998) help with duplicate records posted (1998) Word search (1997) [WebDNA] anyone use curl with shell? (2010) WebCat2b15MacPlugin - [protect] (1997) can I get formvariables for an include? (1999) Shipcost lookup? (1997) one item in several different categories? (2000) Location of Browser Info.txt file (1997) WebCatalog for guestbook ? (1997) [date] problem with %d%m%Y (1998) WebCat2.0 [format thousands .0f] no go (1997) Page authenticating when not supposed to (2003) [WebDNA] Crashing Database (2011) Email template names (1997) Error Lob.db records error message not name (1997) WebCatalog 2.0 & WebDNA docs in HTML ... (1997)