PHP pretty urls (rewriting)?

  • Thread starter Thread starter cjconnor24
  • Start date Start date
C

cjconnor24

Guest
Can someone help me on how to rewrite my urls? I am really bad with regular expressions and all tutorials i have found so far have been pretty difficult for my level of learning.

basically i have my website and the files are named logically e.g.

http://www.mysite.com/about.php
http://www.mysite.com/products.php
http://www.mysite.com/contact.php

how can i rewrite these so they look like so:

http://www.mysite.com/about/
http://www.mysite.com/products/
http://www.mysite.com/contact/

any help would be appreciated
those are dummy examples? it was basically to make my point.
creating separate folders, as far as i'm aware, isn't the correct thing to do as the reasone behind rewriting is purely for search engine optimisation. Google bots etc do not like http://www.website.com/products.php?id=1654

so you re-write this to look like
http://www.website.com/products/1654/

it's not really to do with the file structure of your site as somepeople seem to be confusing this with.

(i may be wrong, i'm not an expert on rewriting by any means!)
 
Back
Top