On my website I have created my pages like so:
http://www.website.com/page1.php
http://www.website.com/page2.php
http://www.website.com/page3.php
This is not SEO friendly, I really want to display them like this:
http://www.website.com/page1/
http://www.website.com/page2/
http://www.website.com/page3/
What is the best way to do this without putting each of the files in their own directory and naming them index.php.
Ideas please.
Use apache
mod_rewrite. Put this in the.htaccess:This will catch all request paths of the form
/somepageor/somepage/and redirect them to/somepage.php(unless the request path refers to an actual file or directory on the server — in which case it will just serve that file or directory).