How to make a sub folder site appear as the root website
Previous article Next articleTo have a more organized root folder at my web server I have my personal website installed in a sub folder. Now I have a better overview over all sub websites.
So the CMS Made Simple website is installed in the folder http://www.website.com/www.
But for the primary domain it isn't that nice to have the second www in the pretty URL's. With a .htaccess file you can hide the sub domain name in the URL's. Note this only works on an Apache web server, you sadly can't use a .htaccess file on a Windows server...
How to use
Server root folder
In the root web server folder I made a .htaccess file containing:
RewriteEngine On
RewriteBase /www
# redirect to www-directory and hide the /www in the URL
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule !^www(/?|/.+)$ /www%{REQUEST_URI} [L]
Note: My sub folder is named www. Has your sub folder an other name, change the text www above into your sub folders name!
Server sub folder
The config.php settings of the website are just like a 'regular' CMSMS™ website:
$config['url_rewriting'] = 'mod_rewrite';
In the sub folder I use the default Core .htaccess file. There is NO need to change the RewriteBase
# i.e: RewriteBase /cmsms
RewriteBase /
The described method works for my server setup. It might be that on other servers it doesn't work and you need to change it.
Please post your remarks below and I will update the article to make it more complete!
Comment Form
9 Comments
Horny Shriya called you 2 times. She is online. Click the below link to chat with her. She is very horny now.
https://live-sex-chat.club/?chat=horny-shriya
Hey, Dave Rogenmoser here...
Do you ever wish there was an easier way to produce content every day?
Like an "easy button" you could push and out comes a well written Facebook post 1 second later.
Better yet, if that "easy button" pumped out all sorts of high converting marketing copy and content like ads, landing pages, emails, and more...
Sounds nice, right?
Well, now that dream is a reality!
Jasper is a new marketing tool we created that uses AI to write high performing marketing copy and content for fast growing businesses.
It can write blogs, facebook ads, google ads, copywriting frameworks, emails, landing page copy and more.
• Save time by enabling AI to write high converting copy
• Get a wide variety of marketing content with just one click
• Stop wasting your time on tedious and overwhelming tasks
• Increase ROI on your ad campaigns
• Write more content in hours than you have in months
Once you sign up, try the PAS (Problem, Agitate, Solution) Framework template and Jasper will write one of these for you!
-------------------------
To claim an account click the link below (You'll also get 10,000 credits to use!):
https://www.jasper.ai/free-trial?fpr=aibrainworks&fp_sid=wcft
You can try it FREE for 5 days! You'll love it or your money back!
-------------------------
Join us inside one of the most groundbreaking marketing tools to launch recently.
I'm 99% sure you'll say "WOW" within 5 minutes of signing up.
It will save you hours every week so that you can focus on growing your business instead of struggling over writing tasks.
To claim an account click the link below (You'll also get 10,000 credits to use!):
https://www.jasper.ai/free-trial?fpr=aibrainworks&fp_sid=wcft
See you on the inside.
-Dave
Hello,
Greetings from Ranker SEO.
Want to know the secret to ranking high on Google?
Why SEO Backlinks?
The answer is to give authority to your website.
How? Creating useful SEO backlinks!
With over 1,000+ completed orders in SEO services, we know how to build high-quality backlinks that can help to improve your website's ranking with safe and efficient off-page link building techniques.
What will you get?
1. Contextual Backlinks: We'll create contextual backlinks with some related content about your niche.
2. Natural and Mixed Methods: 100% dofollow, but nofollow may be included if such links are desired.
3. Efficient Strategy: As you know, not all links are the same. You'll receive unique, safe, and efficient SEO backlinks.
4. Safe Anchor Text: In addition to your target keywords, I'll use diversified anchor text such as URLs and generic keywords.
5. High Quality Backlinks: The posts will be placed on blogs with high metrics.
For real proof, you can visit our website and check it out. Contact us for more details.
Our Skype ID is: support@ranker.one Our website address is: https://www.ranker.one.
Thank you and best wishes.
Ranker SEO
If you don't wish to receive our messages, you can unsubscribe by clicking here: https://www.ranker.one/unsubscribe/?site=cmscanbesimple.org
Hi
Barry here...
Have you tried the AI Copywriter? We love using it to automate email copy, blog posts, newsletters, and more.
Claim 10,000 free credits today at https://aicopywriter.app/
Cheers to your time back,
Barry
unsubscribe by visiting https://unsubscribemeplease.weebly.com/
You have 5 minute opportunity to change your life FOREVER. If you had invested a mere $10 in Trading few years ago, today you would be a Millionaire! ... DO NOT miss this chance again!
Learn more by clicking the below link https://verifysuper.com/cl/i/wowxdv
Hello,
Greetings from Ranker SEO.
Are you looking for a genuine SEO service to rank your website top on Google? Are you cheated by fake SEO companies?
You have found an affordable legitimate SEO agency to rank your website.
We have ranked 100s of websites such as blogs, shopify stores, ecommerce websites, adult websites, saas websites, etc. You can reach more customers by utilizing our backlinks.
For real proof, you can visit our website and check out. Contact us for more details.
Our Skype ID: support@ranker.one
Our Website: https://www.ranker.one
Thanks & Regards
Ranker SEO
If you don't like to receive our messages, you can unsubscribe by click here https://www.ranker.one/unsubscribe/?site=cmscanbesimple.org
Horny Shriya called you 2 times. She is online. Click the below link to chat with her. She is very horny now.
https://live-sex-chat.club/?call=horny-shriya
Hello,
Greetings from Ranker SEO.
Are you looking for a genuine SEO service to rank your website top on Google? Are you cheated by fake SEO companies?
You have found an affordable legitimate SEO agency to rank your website.
We have ranked 100s of websites such as blogs, shopify stores, ecommerce websites, adult websites, saas websites, etc. You can reach more customers by utilizing our backlinks.
For real proof, you can visit our website and check out. Contact us for more details.
Our Skype ID: support@ranker.one
Our Website: https://www.ranker.one
Thanks & Regards
Ranker SEO
If you don't like to receive our messages, you can unsubscribe by click here https://www.ranker.one/unsubscribe/?site=cmscanbesimple.org
I have been searching for this solution for two days. Thank you very much.