PDA

View Full Version : question about redirecting main web page



bouncey
08-03-2005, 03:26 PM
I was looking into maybe redirecting my domain's top page so it points to mambo's directory. That is, if it turns out that mambo can do what I want, my main domain would point to /var/www/html/mambo instead of /var/www/html. This is quite straightforward, and I've done similarly with another domain hosted at my site.

The site manager is easily mapped to a subdomain (and it works okay). But the site applications manager shows links to the admin pages for the various applications. These links assume a fixed path off the main domain. I don't know if they can handle having the top page remapped.

So if I do this, will it break anything important? Have I overlooked anything else? Just thought I'd ask before trying it.

As for "why", I just don't want to make people go through a splash page on the way into the actual content. Also I don't really want the name "mambo" (or whatever) to appear in the URL and make it unnecessarily longer.

torrin
08-03-2005, 03:41 PM
So if I do this, will it break anything important? Have I overlooked anything else? Just thought I'd ask before trying it.

I have no idea if that will cause problems or not. One thing to think about might be that http://www.example.com/manager goes to /var/www/html/manager. If you change your main domain to /var/www/html/mambo, will http://www.example.com/manager go to /var/www/html/mambo/manager instead? If so, you might want to move the manager directory.

I think something that might be safer is using an .htaccess file with a redirect directive.

bouncey
08-04-2005, 02:30 PM
If you change your main domain to /var/www/html/mambo, will http://www.example.com/manager go to /var/www/html/mambo/manager instead?

I already tried setting up a subdomain for this and it worked. So if there's a subdomain called admin.example.com whose root level is /var/www/html/manager, then admin.example.com bounces straight to the manager's login page.

What I'm more worried about is the config pages for the other site applications. eAccelerator for example.


I think something that might be safer is using an .htaccess file with a redirect directive.

I haven't done much with .htaccess files. Can you please tell me more about how this would be done, and what the effects would be? Are there are any good online tutorials that describe what you have in mind?

torrin
08-05-2005, 07:38 AM
I haven't done much with .htaccess files. Can you please tell me more about how this would be done, and what the effects would be? Are there are any good online tutorials that describe what you have in mind?


Create an .htaccess file in your root directory and put something like this in it.


redirect /index.html http://www.example.com/mambo/index.php

I didn't have time to check for tutorials, but I'd go directly to apaches documentation site and have a look.