httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Schleif <...@helices.org>
Subject Re: [users@httpd] redirect to url w/query_string ???
Date Fri, 20 Jun 2008 15:49:48 GMT
* Tom Donovan <donovant@bellatlantic.net> [2008:06:20:09:08:55-0400] scribed:
> Mike Schleif wrote:
> >I want the URL's similar to the following:
> >
> >    http://domain.tld
> >    http://www.domain.tld
> >    http://domain.tld/
> >    http://domain.tld/fjlxasdfja
> >
> >to be redirected to the following URL:
> >
> >    http://Other_domain.tld/?rid=48830
> >
> >
> >I have tried -- and failed -- with following:
> >
> >    RedirectMatch ^/$ http://Other_domain.tld/?rid=48830
> >
> >    RewriteCond   %{QUERY_STRING} ^(rid=48830)$
> >    RewriteRule   ^/$ http://www.Other_domain.tld/$1?
> >
> >
> >NOTE[1]: There is NO query_string in original URL.
> >
> >NOTE[2]: I have NOT found a way to escape the "?" in the destination
> >URL.
> >
> >NOTE[3]: The result is always either "?" replaced with "%" escapes; or,
> >NO query_string at all.
> >
> >
> >What am I missing?
> >
> 
> It's not clear what you are trying to do.
> 
>     Other_domain.tld    vs.   www.Other_domain.tld
>     /                   vs.   all URIs
> 
> If you want everything re-directed to http://www.Other_domain.tld, try 
> using just this single rewrite rule with the [noescape] flag:
> 
>     RewriteRule   ^/.*$  http://www.Other_domain.tld/?rid=48830 [noescape]
> 
> -tom-

Yes, that is what I want to do.

However, neither of the following work:

    RewriteRule  ^/.*$ http://www.Other_domain.tld/?rid=48830 [noescape]
    RewriteRule  ^/.*$ http://www.Other_domain.tld/?rid=48830 [R=301,NE]

Does RewriteRule require RewriteCond, or anything else?

Should RewriteRule work all by itself?

Is there some way to test WHY this does not work?

What am I missing?


-- 
Best Regards,

Mike Schleif
mds resource
877.596.8237
-
What will you do with 1 Million website visitors?
<http://millionsoffreevisitors.com>
--

Mime
View raw message