[users@httpd] Rewrite rules !!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello All,
 
I am newbie to rewrite rules. I am trying to redirect requests coming to http://domain.com/test/ to http://domain.com/test.php using below mod_rewrite rules in .htaccess.
 
================================================
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/test/(.*)/(.*)/(.*)
RewriteRule ^/(.*) /test.php?cid=%1&pid=%2&type=%3 [L]
 
RewriteCond %{REQUEST_URI} ^/test/(.*)/(.*)
RewriteRule ^/(.*) test.php?cid=%1&pid=%2 [L]
 
RewriteCond %{REQUEST_URI} ^/test/(.*)
RewriteRule ^/(.*) test.php?cid=$1 [L]
================================================
 
Above rule does not seem to be working. Am I doing something wrong?
 
Any help would be appreciated.
 
Thank you,

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux