logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Internal URL rewrite across subdomains
Author
boxersoft



Joined: 08 Jun 2013
Posts: 2

PostPosted: Sat 08 Jun '13 13:08    Post subject: Internal URL rewrite across subdomains Reply with quote

I want to rewrite across subdomains, e.g. requests for sub1.mydomain.com/foo.htm -> www.mydomain.com/foo.htm. I can do

this with something like:

Code:
RewriteCond %{HTTP_HOST} ^sub[0-9]\.
RewriteRule (.*) http://www.mydomain.com/$1 [R=303,L]


I want to make it an internal rewrite though, not an external redirect. If I remove the [R=303] I still end up with a redirect (a 302). I assume mod_rewrite is forcing an external redirect because it's to a different [sub]domain.

Is there any way I can overcome this and make the change internal?
Back to top
covener



Joined: 23 Nov 2008
Posts: 60

PostPosted: Sat 08 Jun '13 16:30    Post subject: Reply with quote

you can't jump vhosts w/o proxy or redirect.
Back to top
boxersoft



Joined: 08 Jun 2013
Posts: 2

PostPosted: Sat 08 Jun '13 21:31    Post subject: Reply with quote

Fair enough - thanks.

What I'm trying to achieve is a bit of parallel processing of Ajax requests. I understand that browsers typically restrict themselves to a couple of concurrent requests per host, but that by using subdomains you can squeeze in a few more. Using the subdomain directly (or redirecting to it) is problematic because the user has to be logged in and the session doesn't cross subdomains.

I'm far from expert with such things. I don't know whether proxies would help (or how to implement such an approach if so) or if there's another way around it...
Back to top


Reply to topic   Topic: Internal URL rewrite across subdomains View previous topic :: View next topic
Post new topic   Forum Index -> Apache