cmarshall

msg:3303270 | 2:42 pm on Apr 5, 2007 (gmt 0) |
Technically, this can easily be done with a .htaccess file. You don't even need mod_rewrite. Just say HTML files are PHP. I'm not sure what effects this may have on GPR, but I'll bet it won't have any effect, beyond any changes in the content structure.
|
Philosopher

msg:3303271 | 2:43 pm on Apr 5, 2007 (gmt 0) |
So you are wanting to keep the html pages and basically just include some additional info into them? If that is all, then you can add AddType application/x-httpd-php .html to your .htaccess file. This tells the server to parse your html files for php. Then simply place some php code within your page as you would a normal php file and it will be parsed.
|
grandpa

msg:3303282 | 2:49 pm on Apr 5, 2007 (gmt 0) |
About 95% of my html pages are html in name only, the source is php. 301 rewrite is really the best solution, IMO. Most redirects on my site could be applied with a regex, but I prefer to write them out anyway.. that's just me. RewriteRule ^page.html$ http://www.domain.com/php/page.php [L] It's as simple as that, and leaves me free to worry about things besides how the search engines will treat my pages.
|
coopster

msg:3303469 | 5:16 pm on Apr 5, 2007 (gmt 0) |
If there is no redirection going on then you are best served by changing the handler as to invoking the rewrite engine. In PHP5 use AddHandler. PHP4 you may still have to use AddType. Details here ... [webmasterworld.com...]
|
explorador

msg:3307865 | 8:41 pm on Apr 10, 2007 (gmt 0) |
What about this? Where I work the sysadmin doesn't allow serverside includes so, there is no way I can use shtml, or worse... the company doesn¿t allow me php so I'm stuck with plain html files. My solution was to use a perl that shows something when not logged (the login box) and what I want when logged using the document.write("blah blah"); . Visitors don't visit the cgi-bin... but the normal html pages. This perl prints all of this as a javascript so my html just has the reference to it. I also got some apps working between jsp and plain html this way. It worked with no problems.
|
|