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
Re: [users@httpd] Rewrite rules !!
by Robert Ionescu other posts by this author
Feb 28 2006 4:22AM messages near this date
[users@httpd] Rewrite rules !! | [users@httpd] OS Env variables - TMP
Kunal wrote:
>  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. 

There is no leading slash in the rule pattern (left side) in .htaccess 
files, so you might try

RewriteRule ^test/([^/]+)/([^/]+)/(.*) /test.php?cid=$1&pid=$2&type=$3 [L]
RewriteRule ^test/([^/]+)/(.*) /test.php?cid=$1&pid=$2 [L]
RewriteRule ^test/(.*) /test.php?cid=$1 [L]


Remember the rule pattern is processed before the conditions are tested.

-- 
Robert

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html>  for more info.
To unsubscribe, e-mail: users-unsubscribe@[...].org
   "   from the digest: users-digest-unsubscribe@[...].org
For additional commands, e-mail: users-help@httpd.apache.org
Thread:
Kunal
Robert Ionescu

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