Forum Moderators: phranque
He is running his own apache server. We have a web mall set up on his server.
ie.... www.webmall.com/catalog
He has several other sites that people can use
www.site1.com
www.site2.com
customers sign up for access to his services from either of his site. We would like them to both be able to use the web mall but dont want to have to duplicate the webmall....
Is there any way to mask the site so someone coming from either site would only see their url...
ie...
www.site1.com/catalog
www.site2.com/catalog
Thanks
Note that some people prefer issuing redirects from www.site1.com to www.mainsite.com, since (I believe, someone check me on this) it can help with search-engine rankings if you don't have identical content on multiple sites. If you opt for issuing a redirect, there are numerous examples of setting this up in the forum archives; it seems to come up at least once a week. =)
Good luck.
All of the sites he runs on his server have their own IP address and domain...
I want people to be able to go to the origial domains... so they can sign up for services at the different domains....
But say they are on
www.site1.com
when they click on the shopping cart button... they go to the www.webmall.com/catalog page which is the shopping cart.... however their url in the address box of the browser still says
www.site1.com/catalog
Is that what a redirect will do? I always thought that a redirect will move anyone coming intow www.site1.com automatically to www.webmall.com/catalog... this is not what I want to happen....
Be gentle... I am trying to understand... but the apache documentation reads like the Encyclopedia Galactica....
Thx
If the transparent rewrite solution is unworkable for some reason, a proxy-based solution may be the way to go. So, questions requiring answering:
# Are all three sites on the same gear?
all on the same server...
# Do you have write access to httpd.conf?
have access to everything
# How much work are you willing to do to make this work? =)
What ever it takes.... I have perused the mod-rewrite documentation... couldnt decipher it. wasnt sure if it was what I needed or not.... Could you point me in the right direction?
NameVirtualHost 192.168.1.1:80
<VirtualHost 192.168.1.1:80>
ServerName www.site1.com
Alias /catalog /path/to/www.webmall.com/htdocs/catalog
(other directives for this virtualhost here)
</VirtualHost>
<VirtualHost 192.168.1.1:80>
ServerName www.site2.com
Alias /catalog /path/to/www.webmall.com/htdocs/catalog
(other directives for this virtualhost here)
</VirtualHost>
Alternatively, this could be handled on the filesystem by using symlinks; check the ln(1) manpage for details on this.
Does this help?
NameVirtualHost 192.168.1.222:80
<VirtualHost 192.168.1.222:80>
ServerName www.site1.com
Alias /catalog C:\apache2\htdocs\vhosts\webmall.com\catalog
</VirtualHost
the only thing I thought could be wrong was the /catalog
the actual folder it is coming from is www.site1.com/validation
Any idea why it is not working?
Alias /catalog C:\apache2\htdocs\vhosts\webmall.com\catalog
With this, a request for www.site1.com/catalog will pull content from C:\apache2\htdocs\vhosts\webmall.com\catalog. You can change the LHS (left-hand-side) of the 'Alias' directive to be /validation if you'd prefer; it's free-form text. It could be '/orangejuice' or '/cookiemonster'; it's just the URL the browser will have to go to to access the directory listed on the RHS of the Alias directive. =)
when i log in from www.site1.com/validation it sends me to www.webmall.com/catalog but doesnt have the virtual address www.site1.com
I dont see any errors in the log files...
The access logs for www.site1.com just have the standard entry for successful access of www.site1.com/validation
ALL I can figure now is that it is the cart. It is an OSCommerce shopping cart that uses both a physical and virtual path for URL's it must be taking them from the configuration instead of the $_referrer...
I doubt there is a way around this but you would probably know better than I.