Return to Snippet

Revision: 7778
at August 12, 2008 12:56 by luizlopes


Initial Code
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
 
RewriteCond %{REQUEST_URI} /search.php$
RewriteCond %{QUERY_STRING} ^q=([A-Za-z0-9\+]+)&s=Search$
RewriteRule ^(.*)$ /s-%1? [R=301,L]
 
RewriteRule ^s-(.*)$ /search.php?q=$1&s=Search&a=1 [L]
</IfModule>

Initial URL
http://www.talkincode.com/using-mod_rewrite-on-form-parameters-89.html

Initial Description
Great way to use mod_rewrite with friendly URLs and Form

Initial Title
Using mod_rewrite On Form Parameters

Initial Tags
url, php

Initial Language
Apache