apache : mod_rewrite

Suppose you wan to rewrite a url to another . Take for example the following

HTTP://www.raoset.com/jasonpruim112 and  and want to rewrite  to a script
HTTP://www.raoset.com/purl/purl.php?purl=jasonpruim112
 
we can do it with addin the folowing in your virtual host  

<Directory /websites/domain/web >

RewriteEngine On

RewriteRule  /(.*)       /purl/purl.php?purl=$1

</Directory>







 

No comments:

Other Articles

Enter your email address: