Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: open
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..
Anyone have any thoughts?
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.
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.
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.
It worked with no problems.