What is the process of rewriting URLs?

Posted by bozdoz on Pro Webmasters See other posts from Pro Webmasters or by bozdoz
Published on 2011-11-19T21:38:10Z Indexed on 2011/11/20 2:17 UTC
Read the original article Hit count: 531

Filed under:
|
|
|
|

What I would really like is a step by step resource on how to rewrite URLs. I have seen the documentation on mod_rewrite for example in Apache, but I still find myself a little lost.

  1. If I have example.com/products.html, can I change this to appear as example.com/products ? For that to happen, do I make all of my links point to /products and then have a rewrite rule that directs /products to /products.html? Or is it the other way around?
  2. Also, for PHP forms, I've noticed that I can't have a form action that points to a directory: for example, it requires /mail/index.php instead of just /mail. Can mod_rewrite fix this too?

© Pro Webmasters or respective owner

Related posts about php

Related posts about apache