friendly url with htaccess | prosoxi.com

Categorized | .htaccess

friendly url with htaccess

suppose you want /articles.php?cat=$1&art=$2 to become magazine/1/2

then you need these two rules:

#articles.php?cat=$1&art=$2
RewriteRule ^magazine/([^/]*)/([^/]*)$ /articles.php?cat=$1&art=$2&marker [L]

RewriteCond %{REQUEST_URI} /articles\.php [NC]
RewriteCond %{QUERY_STRING} ^cat=(.*)&art=(.*)
RewriteCond %{QUERY_STRING} !marker

RewriteRule (.*) http://mydomain/%1/%2? [R=301,L]



Leave a Reply

Domain Finder

Domain Finder Tool by Truste.gr

read more for domains

Advertisers

Wedstar all about wedding - gamos - γαμος
Κατασκευή ιστοσελίδων
Domain Names | Hosting

Adds