Web Hosting Talk







View Full Version : mod_rewrite for Earthlink?


thartman
09-23-2003, 10:53 AM
I have a client who uses Earthlink as their host. We've recently developed a little web application for them, and they require it to be hosted on their current server. They want a setup like this:

http://www.company.com -> their website.
https://other.company.com -> the new web app.

Earthlink says that this will be achieved by putting 'other' in a directory on the main website and using .htaccss and mod_rewrite. But despite repeated requests, the only assistance they will give is "Look at Apache's website. They have documentation."

I've read through the documentation for mod_rewrite several times and I just can't seem to get it to work. I can't get it to NOT throw an internal error, in fact.

I believe I have two rules required here.

1: map other.company.com to .../www/other
2: change http to https when http://other.company.com (but not when www.company.com or company.com.

I hope someone here has more of a clue than I do. I've been banging my head on the desk for a couple days, now. Thanks in advance for whatever hints you can give me.

-T

:: paVel ::
09-23-2003, 12:30 PM
http://httpd.apache.org/docs/vhosts/examples.html

-----
Server configuration:

...
Port 80
ServerName server.domain.tld

NameVirtualHost *

<VirtualHost *>
DocumentRoot /www/domain
ServerName www.domain.tld
...
</VirtualHost>

<VirtualHost *>
DocumentRoot /www/subdomain
ServerName www.sub.domain.tld
...
</VirtualHost>
-----


Would that be it?

thartman
09-23-2003, 12:32 PM
I do so wish I could do it that way. As I said, Earthlink said it has to be mod_rewrite via .htaccess. I don't have access to httpd.conf. If I did, this wouldn't be a problem.

Lightwave
09-24-2003, 09:20 AM
Perhaps i'm not understanding you.. but a simple .htaccess file containing:

RewriteCond %{HTTP_HOST } ^other.company.com
RewriteRule ^(.*) https://other.company.com/$1

Jeez... stinking filters SUCK...

Remove the extra space after HOST

Otherwords everytime I'd type it... it'd display as %{HTTP_******