I've got a bit of a dilemma - am rebuilding a site with indexed and well ranked pages. I have a lot of .htm pages that are now going to require a bit of dynamic content (log in box / logged in navigation etc). I really want to keep my URL's and not do 301 redirects (a lot of pages!) so was wondering about keeping names as .htm but let web server internally do the work to get content from php.
So basically, we tell web server that when request comes for #*$!#*$!#*$!.htm get content from index.php.... and send that back This would be done through a rewrite rule..
So, the question is whether or not Google will hammer me for this - or is this a good way of keeping URL's but having dynamic content as well..
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.
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...]
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.