?
Solved

htaccess rewrite root

Posted on 2011-05-03
1
Medium Priority
?
225 Views
Last Modified: 2012-06-21
The current site   www.example.com            is running in the root directory      say         root/


I have a drupal site in the folder called  "drupal"   so it is here    root/drupal/


how do I tweak the .htaccess file so when people go to example.com, or example.com/about-us

it takes them to the drupal site?
0
Comment
Question by:charmingduck
1 Comment
 
LVL 5

Accepted Solution

by:
SimonDard earned 500 total points
ID: 35513454
This will redirect all requests in root (if root is document root) to /drupal.

RewriteEngine on

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ /drupal/$1 [L]

But why not move everything from drupal into root?
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Loops Section Overview
Suggested Courses
Course of the Month13 days, 16 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question