php - Mod Rewrite URL with several parameters -
i'm having hard time rewriting url. .htaccess file contains rules need add new rule existing ones. current rule includes redirecting https:// if http:// used (except if url contains 'php05142013'). here's current content of .htaccess file:
errordocument 404 https://mycreditstatus.co.za/404.php rewriteengine on rewritecond %{https} off rewritecond %{http_host} ^mysite\.co\.za$ [nc] rewritecond %{request_uri} !^/(php01202015) [nc] rewriterule (.*) https://%{http_host}%{request_uri} [l,r=301] rewritecond %{https} off rewritecond %{http_host} ^www.mysite\.co\.za$ [nc] rewritecond %{request_uri} !^/(php01202015) [nc] rewriterule (.*) https://mycreditstatus.co.za [l,r=301] what want achieve in addition current rules, rewrite url https://mysite.co.za/3pv/xnanr3abtgo%3d/3irqrhe%2fqje%3d https://mysite.co.za/index.php?action=register&auth=1&p=3pv&eid=xnanr3abtgo%3d&us=3irqrhe%2fqje%3d
i've been trying ^/([^a-za-z0-9.)(/\\%-])/([^a-za-z0-9.)(/\\%-])/([^a-za-z0-9.)(/\\%-])/([^a-za-z0-9.)(/\\%-])/?$ index.php?action=register&auth=1&p=$1&eid=$2&us=$3&%{query_string} [nc,l] # process product requests , i'm sure it's wrong. i'm new mod rewrite , find confusing. appreciated. thanks.
you can use new rule:
rewriterule ^([^/]+)/([^/]+)/([^/]+)/?$ index.php?action=register&auth=1&p=$1&eid=$2&us=$3 [qsa,l]
Comments
Post a Comment