Two apache questions

Mike Starke plug-discuss@lists.plug.phoenix.az.us
Fri, 10 Jan 2003 10:50:28 -0500


On Fri, Jan 10, 2003 at 03:25:25PM -0000, Miles Beck wrote:
/_
/_Hello,
/_
/_I have a couple apache questions.
/_
/_I have two domain names, the second domain name is a mispelling of the first.
/_We registered this in the event that someone mispells the domain. The
/_mispelled name is only one letter off from the correctly spelled name. Which
/_is the best way to have someone redirected from www.mispellednamefoo.com
/_www.correctlyspellednamefoo.com.
/_
/_The second issue is a DocumentRoot issue. On our server the document root now
/_is /var/www/. We would like customers to be able to only use the domain name.
/_As it is now to get to the customers php page we have to specify the entire
/_url to the shopping cart which is /var/www/xcart/customer/home.php. When I
/_specified the previous path in DocumentRoot quite a few images were broken and
/_then we could no longer log in to the admin page. Would a symbolic link from
/_/var/www/xcart/customer/home.php to /var/www/index.html correct this issue?
/_
I'll take a stab at this, but you may want to double check me:

A. I think a VirtualHost Directive would take care of this issue. Then, just
   specify the same DocumentRoot as the main site?

B. Perhaps an Alias for your image directory might be in order. Something like these two:

DocumentRoot /var/www/xcart/customer/
Alias /images /var/www/xcart/customer/images
or
Alias /images /var/www/images (whereever your images are located)

The first portion of the Alias should be a directory relative to your
document root.

Or, I suppose you could just create an alias instead of changing the DocumentRoot

Alias /xcart /var/www/xcart/customer

And then the URL "http://yourdomain/xcart" would take them to the shopping section.

Also make sure that the file "home.php" is set up as a DirectoryIndex file name.

YMMV

v/r
-Mike