UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > Control Panel Questions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-03-2007, 16:48
Junior Member
 
Join Date: Mar 2007
Posts: 16
Default Is this possible - Main domain points to a folder

Hi

What I would like to do is create a folder in my public HTML eg "myfolder" then put all the files for my main domain in it rather than just having them loose in the public HTML folder. Can I them make this where my main domain goes but without seeing the "myfolder".

Eg) I would like it to show www. maindomain.com rather than www. maindomain.com/myfolder

Thank you
__________________
www.graphicdesignblog.co.uk
Reply With Quote
  #2 (permalink)  
Old 09-03-2007, 17:50
Premium Member
 
Join Date: Jan 2007
Posts: 209
Default

Create an .htaccess file on the public_html folder and add:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.[^.]+\.maindomain\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.([^.]+)\.maindomain\.com(.*) /myfolder$1$2


That should do. replace the values with your actual values. Mark had posted this htaccess URL once on these forums,
check it out: http:// cooletips.de/htaccess/index.php

Regds
IJ

Last edited by swexpert; 09-03-2007 at 17:53.
Reply With Quote
  #3 (permalink)  
Old 10-03-2007, 09:02
Junior Member
 
Join Date: Mar 2007
Posts: 16
Default

Thanks for your help. Did try to search for an answer. This might be good as a sticky post admin?
__________________
www.graphicdesignblog.co.uk

Last edited by TRoskell; 10-03-2007 at 09:03. Reason: spelling
Reply With Quote
  #4 (permalink)  
Old 10-03-2007, 10:07
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,390
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

.htaccess Generator

This post deserves to be sticky post as what has been explained by IJ is just for your requirement but the .htaccess generator would be helpful for everyone.
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Reply With Quote
  #5 (permalink)  
Old 10-03-2007, 14:01
Junior Member
 
Join Date: Mar 2007
Posts: 16
Default

Tried the suhhested .htaccess code but it syill show the sub folder www. maindomain.com/myfolder (if possible I would like to hide the myfolder - I know in some other hosting I have I can target a domain at a folder - am I doing something wrong?

Thanks
__________________
www.graphicdesignblog.co.uk
Reply With Quote
  #6 (permalink)  
Old 10-03-2007, 17:13
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,390
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

let me know what domain name should resolve to which directory. I will make permanent changes in httpd.conf to make this work. You can open a ticket to get quick reply.
__________________
UK Web Hosting || Business Hosting || eUKhost Knowledgebase
Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our Affiliate Program for FREE and earn 20% commission on each referral.
Reply With Quote
  #7 (permalink)  
Old 10-03-2007, 19:33
Premium Member
 
Join Date: Jan 2007
Posts: 209
Default

Try This in htaccess:

RewriteEngine on
rewritecond %{REQUEST_URI} yourdomain.com/
rewriterule (.*) http://yourdomain.com/folder/$1 [l,nc]

However, for the sake of simplicity and to prevent too much load on apache, what has been suggested in the above post is the right method. However, it will not tally later on if you take a look at FAQs and DOCs etc. which will mention the webroot to public_html. IF you're comfortable with that, please go ahead.

But the best thing is, why do you want to get it done in the first place? Logically, it does not make any difference, the whole world's webpages are in webroot at public_html folder.

Regds
IJ
Reply With Quote
  #8 (permalink)  
Old 14-03-2007, 20:42
Member
 
Join Date: Feb 2007
Posts: 47
Default

Quote:
Originally Posted by eukhost.com View Post
let me know what domain name should resolve to which directory. I will make permanent changes in httpd.conf to make this work. You can open a ticket to get quick reply.
I may be interested in having this done to my account - Question is, are the existing addon domains unaffected? - For me, there would be no point in doing it if i would need to copy all my addon domain folders (that are currently in public_html) into the newly created public_html/myfolder

What i want to achieve is a list of folders in my Public_html folder for each of my domains, including my main hosted domain.
Reply With Quote
  #9 (permalink)  
Old 20-03-2007, 21:30
Member
 
Join Date: Feb 2007
Posts: 47
Default

Following a help desk ticket - addon domains are unaffected, and the following is achieved.

Quote:
Originally Posted by Chrisp View Post
What i want to achieve is a list of folders in my Public_html folder for each of my domains, including my main hosted domain.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:10.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles