Re: .htaccess redirect issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/27/2010 12:16 PM, J. Bakshi wrote:
> Hello list,
>
> I am trying to achieve a very particular .htaccess redirect arrangement.
> I have made it worked but halfway :-(
>
> I have written a redirect rule as
>
> `````````````````
> RewriteCond %{HTTP_HOST} ^testyou.mydomain.com
> RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
> [R=301,L]
>
> `````````````````````````
>
> So http://testyou.mydomain.com should redirect to
> http://www.mydomain.com\?domain=testyou.mydomain.com
>
> But with the above rule the link redirects to
>
> http://www.mydomain.com\?=testyou.mydomain.com
>
> So without the *domain* in between.
>
> Could any one suggest to
>
> [1] how can I fixed this so the *domain* appears like
> http://www.mydomain.com\?domain=testyou.mydomain.com
>
> [2] Can there be any arrangement so that I can use bulk redirection ?
> Say putting a variable in place of testyou.mydomain.com , so that those
> two rules can effectively redirect all subdomains pointed to that server
> ? I don't know if it really possible. Any sugestion/clue please ?
>
> Thanks
>
>   

[1] is fixed  by

RewriteRule ^(.*)$ http://www.mydomain.com\?domain=testyou.mydomain.com
[R=301,L]

[2] Is there any way to modify the rule for bulk domain or should I
write the rule set for each individual domain ?

Thanks for our time


-- 
জয়দীপ বক্সী


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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux