I've beens scratching my head trying to get this to work but I haven't be able to.
I need to redirect all html pages to php pages, all with the same name except the extension but only if the php version exists.
So if a page is "products.html" i need it to check if "products.php" exists, if it does, execute the php version (without redirecting the browser and showing products.php) if it doesn't, render the html version
Can this be done using htaccess? if so, could you help me with an example or point me to where i can find examples of this?
Side Note: I need to do this with both .html
and .htm
pages.
I also tried making html pages execute php code using the AddType and AddHandler examples i found online but none of them worked for me so that's why i decided to use php versions of each page instead.
Thanks.