Redirecting from example.com to example.com/drupal I have Drupal 7 installed in a ./drupal directory in my web server (shared host).

I would like www.mysite.net to be redirect to www.mysite.net/drupal in a transparent way for visitors. They should see in their navigation bar www.mysite.net instead of www.mysite.net/drupal.  

I also want clean URLs to work. To make clean URLs work, I have edited my drupal/.htaccess file and uncomment this line:


RewriteBase /drupal


I read a lot of posts about having Drupal in a subdirectory, but the suggested solutions don't work (they cause an internal server error, or problems with CSS and images). Most of these tutorials are based in 2 htaccess file, one in the root directory and one in the directory where Drupal is installed. They also required to change $base_url in settings.php.
Try in .htaccess and make sure RewriteEngine On

RewriteRule !^drupal/ drupal/%{REQUEST_URI}


Then try example.com if this maps to example.com/drupal/

I think RewriteBase /drupal will not produce the result.

It should be either RewriteBase / or commented in the case above.



I have gone through this issues deeply and fixed on my end.

Put following rule to your .htaccess on root.

RewriteEngine On
RewriteRule !^drupal/ drupal/index.php?q=%{REQUEST_URI}


The default .htaccess of Drupal is restored to original.

After this setup css and image will fail those are depending on $base_path.
I then override $base_path value from /drupal/ to / using hook_init()

function my_custom_module_init(){
   global $base_path;
   $base_path = '/';
}


And this is fixed.