ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> httpd-users
httpd-users
[users@httpd] Rewrite rules !!
by Kunal other posts by this author
Feb 28 2006 4:14AM messages near this date
Re: [users@httpd] WebDAV directory allowing all access despite limits | Re: [users@httpd] Rewrite rules !!
Hello All,

I am newbie to rewrite rules. I am trying to redirect requests coming to http://domain.com/t
est/ 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,
Attachments:
unknown1
unknown2

Thread:
Kunal
Robert Ionescu

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved