page.html?cat=catname to index.php?s=page&cat=catname

Discuss practical ways rearrange URLs using mod_rewrite.

page.html?cat=catname to index.php?s=page&cat=catname

Postby overflow » Fri Feb 09, 2007 7:33 am

Hi

page.html to index.php?s=page

Code: Select all
RewriteEngine on

RewriteRule ^([A-Za-z0-9-]+).html/?$ index.php?s=$1 [N]



page.html?cat=catname to index.php?s=page&cat=catname

How can I do like that?
overflow
 
Posts: 19
Joined: Thu Oct 12, 2006 2:02 am
Location: Turkey

Postby richardk » Fri Feb 09, 2007 2:21 pm

The QSA flag:
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^([-a-z0-9]+)\.html$ index.php?s=$1 [NC,QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 34 guests

cron