PHP mod rewrite .htaccess file question


I'm new to PHP and i was trying to learn mod rewrite to rewrite my URLs i use godaddy as my hosting company and they say to add the desired code to the body of your .htaccess file how do I mod rewrite my URLs and add it to my .htaccess file?

Can some one give me an example of how to do this as well as point me to a good tutorial and or book on how to mod rewrite my URLs?




A note, though, goDaddy normally requiresRewriteBase /

Quick 'n dirty

RewriteEngine On
RewriteBase /
RewriteRule ^/?about/?$ about.php [L,NC,QSA] # is sent to the server as
RewriteRule ^/products/([0-9]+)$ /products.php?id=$1 [L,NC,QSA]  # is sent to the server as 

People are also looking for solutions to the problem: How can I overlay a watermark on an already resampled image in PHP (using GD)?


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.