Simple HTACCESS file REWRITE needed

Hi,

I am developing a simple site. The site is PHP. I am just using the ‘echo’ function to add content to the website so there are no complicated php page names.

They page names are just like this:
home.php
contact.php
about-us.php

What I need to do is change every page name to the .htm version.

Can you help?

So the pages online should appear like this:
home.htm
contact.htm
about-us.htm

This should be simple but I am not sure what code I need in the .HTACCESS to change the file extension of every webpage to .htm.

Thanks for your time,

Matthew.

Matthew,

You have two options:

  1. Tell Apache to serve your .htm files as PHP scripts

OR

  1. Use Apache’s mod_rewrite to check for the existence of a PHP script with the same name and redirect to that script if it exists. If you need code for that, check the examples at http://dk.co.nz/seo.

Regards,

DK

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.