/ Published in: Apache

Great way to use mod_rewrite with friendly URLs and Form
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<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>
URL: http://www.talkincode.com/using-mod_rewrite-on-form-parameters-89.html
Comments
