![]() Topic awaiting preservation: changing *.html to *.php? (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: there...no..there..... |
![]() So I am going to be adding some stuff to an existing website. No big deal but it is going to require some server side stuff. Since PHP is the only server side language I am comfortable with, this is what I'm going to use. |
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() mod_rewrite? |
Paranoid (IV) Inmate From: London |
![]() |
Maniac (V) Mad Scientist From: Denver, CO, USA |
![]() If I'm not too much mistaken, search engine rankings are based on domain, generally, and the drill down doesn't occur unless the source document is NOT a standard default name (index.php, default.asp, etc). |
Nervous Wreck (II) Inmate From: |
![]() Setup a 301 re-direct to the new site. Shouldn't this also help out the indexing of search engines? |
Maniac (V) Inmate From: there...no..there..... |
![]() well, I don't think I explained that very well ( I posted that while I was on vacation |
Maniac (V) Inmate From: there...no..there..... |
![]() OK, this seems to work on one page: code: RewriteEngine on RewriteRule ^test\.html$ test.php
code: RewriteEngine on RewriteRule ^*\.html$ $1.php
|
Maniac (V) Inmate From: there...no..there..... |
![]() ok. This is working for me: code: RewriteEngine on RewriteRule ^([a-z]+).html$ $1.php
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() code: RewriteEngine on RewriteRule ^([^.]+)\.html$ $1.php [R=301]
|
Maniac (V) Inmate From: there...no..there..... |
![]() TP, code: RewriteEngine on # For any single word.html or 1.html RewriteRule ^([a-z0-9]+).html$ $1.php [NC] #This is for stuff like wood05.php RewriteRule ([a-z]+[0-9]+).html$ $1.php [NC] #This is for stuff like waiting_benches.php RewriteRule ([a-z]+[_]+[a-z]+).html$ $1.php [NC] #For stuff like wood-05.php and standard-plus.php RewriteRule ([a-z]+[-]+[a-z0-9]+).html$ $1.php [NC]
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
![]() Hm. You might need a RewriteBase / |
Maniac (V) Inmate From: there...no..there..... |
![]() yeah, that was it. RewriteBase /mydirectory/ did the trick. |