Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

htaccess glitch / issue

Status
Not open for further replies.

joe2012

Programmer
Jul 30, 2012
2
US
Hi,
I have some minor issue with htaccess codding. One of mode rewires probably conflicts with other rules but I cannot find out where :-(. Any help would be appreciated. Doesn't matter where I put third line (marked as "Conflicting/not working code") it returns 404. Theoretically there is no conflict but something causes issues there.
Thanks!
Code:
RewriteEngine On
#Conflicting/not working code: 
RewriteRule ^/p/c/?([a-zA-Z0-9]+)?$ /pages/login/ccc.php?var=$1 [L,QSA]

#working fine
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9\-_/\.]+)/info/?([a-zA-Z_\-]+)?(/|/*)?$ /pages/my_info_test.php?var=$1&mode=$2 [L,QSA]

#working fine
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^/pages/*
RewriteCond %{REQUEST_URI} !^/pages/.*
RewriteRule ^([a-zA-Z0-9\-_/\.]+)$ /pages/my_test.php?var=$1 [L,QSA]
 
small correction, not working line is
RewriteRule ^/p/c/?([a-zA-Z0-9]+)?$ /pages/login/ccc.php?var=$1 [L,QSA]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top