httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aman Raheja <arah...@techquotes.com>
Subject Re: [users@httpd] RewriteRule question
Date Mon, 27 Sep 2004 15:02:39 GMT
Joshua Slive wrote:

>On Fri, 24 Sep 2004 14:44:41 -0500, Aman Raheja <araheja@techquotes.com> wrote:
>
>  
>
>>RewriteRule   ^/a\?(.+) http://httpd.apache.org/$1 [R]
>>    
>>
>
>  
>
>>According to the second line the pattern is only applied to /a and not
>>/a?docs/misc/rewriteguide.html
>>What's going on here ?
>>    
>>
>
>RewriteRules do not match against the query string.  You can do
>
>RewriteCond %{QUERY_STRING} (.+)
>RewriteRule ^/a http://httpd.apache.org/%1
>
>Joshua.
>  
>
I got that.
It does redirect it to where I want. Here's the example

RewriteEngine on
RewriteLog    logs\rewrite.log
RewriteLogLevel    9
RewriteCond %{QUERY_STRING} (.+)
RewriteRule   ^/a http://httpd.apache.org/%1 [R,L]

So when I do http://localhost/a?docs/mod/mod_rewrite.html it goes to 
http://httpd.apache.org/docs/mod/mod_rewrite.html?docs/mod/mod_rewrite.html

Well, I sure don't need to have the trailing ?docs/mod/mod_rewrite.html

What's missing?
Thanks
Aman

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message