• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Quick Question

R

rafcarter

Guest
Can anyone tell me how I set my main directory to start always?

What I mean is this.

Currently when someone types www.xxx.com I want it to start in www.xxx.com/CMS

I have Linux Fedora Core 2. Apache 2

Can someone tell me how to do this quickly?
 
You could put the following into your vhost.conf file in the domain's conf folder:

/home/httpd/vhosts/domain.com/conf/vhost.conf

Put the following:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteCond %{REQUEST_URI} !^/CMS/
RewriteCond %{REQUEST_URI} !error_docs
RewriteRule (.*) /CMS/$1
</IfModule>

Make sure you change 'domain.com' to the real domain name. If vhost.conf does not already exist, then just create a new one. (for future newbie readers)
 
Back
Top