Forum Moderators: phranque
I have a php page that now takes the place of several html pages. My rewrite is to display the php page and still show the html page (and PR) in the browser address bar.
Here's what I did:
RewriteRule ^page.html$ h**p://www.mydomain.com/page.php [L]
This works, no question about that. page.html appears in the browser address, page.php is being displayed.
Is there anything I've overlooked? I see a potential problem with page.html and page.php containing duplicate content - to some extent.
Will page.php get spidered? It's a combination of html and contains calls to my db on demand.
Anything else I ought to be considering?
This is one of the epiphanies of mod_rewrite -- It makes clear the distinction between a URL and a filename, and illustrates the fact that they need not have anything to do with each other. "Connecting" URLs to filenames is the server's job, and it is not necessarily a straighforward thing.
RewriteRule ^page\.html$ /page.php [L]
Jim