Topic awaiting preservation: changing *.html to *.php? |
|
---|---|
Author | Thread |
Maniac (V) Inmate From: there...no..there..... |
posted 08-21-2008 17:36
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 |
posted 08-21-2008 18:07
mod_rewrite? |
Paranoid (IV) Inmate From: London |
posted 08-21-2008 18:57 |
Maniac (V) Mad Scientist From: Denver, CO, USA |
posted 08-21-2008 22:20
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: |
posted 08-22-2008 02:08
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..... |
posted 08-24-2008 00:34
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..... |
posted 08-25-2008 22:44
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..... |
posted 08-25-2008 23:55
ok. This is working for me: code: RewriteEngine on RewriteRule ^([a-z]+).html$ $1.php
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 08-26-2008 10:42
code: RewriteEngine on RewriteRule ^([^.]+)\.html$ $1.php [R=301]
|
Maniac (V) Inmate From: there...no..there..... |
posted 08-26-2008 15:02
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 |
posted 08-27-2008 15:02
Hm. You might need a RewriteBase / |
Maniac (V) Inmate From: there...no..there..... |
posted 08-27-2008 19:15
yeah, that was it. RewriteBase /mydirectory/ did the trick. |