Forum Moderators: phranque

Message Too Old, No Replies

Server setup to allow rewriting of subdomains

In my former host this worked, but the new one says not possible

         

phoenix_fly

11:03 pm on Sep 4, 2005 (gmt 0)

10+ Year Member



Hello Jim and all,

Hereīs the rule:

RewriteCond %{REQUEST_URI}!\.(cgi¦css¦gif¦jpg)$
RewriteCond %{HTTP_HOST} ^www\.([^\.]+)\.mysite\.com(\.br)
RewriteRule ^(.+) /home/mysite/www/cgi-bin/vendor.cgi?vendor=%1\&section=$1 [L]

They say that they probably canīt run wildcards in the subdomain or something like that. Does this proceede? Do change host or thereīs something I tell them to do?

Thanks

phoenix_fly

jdMorgan

11:53 pm on Sep 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



All they need to do is set up a ServerAlias [httpd.apache.org] of *.yourdomain.com in httpd.conf (see example in linked documentation).

If this is critical to your site, and they refuse, then change hosts.

Note: Some hosts may only provide this configuration for accounts with a unique IP address because it simplifies administration and configuration.

Jim

phoenix_fly

12:16 am on Sep 5, 2005 (gmt 0)

10+ Year Member



Hey Jim, great! Iīve just emailed them with this info. Iīll let you know when itīs up and running. Thanks a lot!

phoenix_fly

4:30 pm on Sep 12, 2005 (gmt 0)

10+ Year Member



Hey Jim,

Sorry it took me so long to respond. Itīs been a war to make them do it. They had already closed the case, saying that this ServerAlias directive isnīt allowed for shared hosting accounts but now Iīm reopening the case, because it seems the absence of this directive is causing some strange behaviour Iīd like to confirm with you if it is possible that the cause is this lack of ServerAlias.

Here's the phenomenon: having to install SSL on this host, I regenerated my csr with the common name of 'thissite.com', just like I did months ago with the other suscessfull SSL installation in the other host. Ok, whatīs my surprise, after completing all steps, to see that the SSL certificate doesnīt work with the www.
url (https://www.thissite.com)!

I then emailed them about it and they said 'hey, ok, you have to generate your csr including the www. in the common name. But, and hereīs where I need your unvaluable Apache wisdom, isnīt this because they donīt have set the ServerAlias directive? I mean, it seems everything before the thissite.com is being treated like a f* subdirectory! And also www.! Does this make sense for you?

I also remember that at the former host the subdomain - www.merchantname.thissite.com - urls DID work cleanly with the thissite.com common-name-issued certificate. Was this be a gift from ServerAlias too?

I wait for your help then

Thanks my friend!

phoenix_fly

jdMorgan

4:59 pm on Sep 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure about whether ServerAlias will help in this case. But be aware that "www" *is* a subdomain -- there is nothing special about "www" that makes it any different than any other subdomain, except that it is often aliased to the root domain by most hosting companies.

If you've got a lot of sites with these guys, tell them to fix these problems. If not, ask them twice, and then get another host that supports your needs.

Jim