I have a site in a sub-directory called "drupal-7.7". I was unable to install Drupal directly into public_html. I am now looking to remove the /drupal-7.7/ from my URL, so my pages look like this: http://www.example.com/
and not this: http://www.example.com/drupal-7.7/
I found this answer on Stack Overflow (http://stackoverflow.com/questions/5716839/how-to-remove-drupal-from-url...).
It essentially says create a .htaccess file in public_html which looks like this:
RewriteEngine On
RewriteBase /example.com
RewriteRule ^$ drupal/ [L]
# rewrite rules for drupal files
RewriteCond %{DOCUMENT_ROOT}/example.com/drupal/$1 -f
RewriteRule ^(.*)$ drupal/$1 [L,QSA]
# rewrite rules for drupal paths
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ drupal/index.php?q=$1 [L,QSA]
I have done this, editing the "drupal" paths to "drupal-7.7" paths. However, I am getting a 500 Internal Server error. The .htaccess file in public_html looks like this:
RewriteEngine On
RewriteBase /example.com
RewriteRule ^$ drupal/ [L]
# rewrite rules for drupal files
RewriteCond %{DOCUMENT_ROOT}/example.com/drupal-7.7/$1 -f
RewriteRule ^(.*)$ drupal/$1 [L,QSA]
# rewrite rules for drupal paths
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d