isaac
03-09-2008, 04:44 PM
Hi,
I installed drupal in my subdirectory http://www.mysite.com/www/DRUPAL
Currently i am accessing it as www.mysite.com/DRUPAL
I would like it to be accessed as www.mysite.com
.......
In this regard, i found and tried the following piece of code. It works for many others but I am not sure why it does not work for me.
.......
The steps are:
(1) Edit the root .htaccess
I deleted off the existing contents:
Options +Indexes
php_value error_reporting 7
php_flag display_errors off
I added the following:
Options -Indexes
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC]
RewriteRule .* http://www.mysite.com/ [L,R=301]
RewriteRule ^$ drupal/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/drupal%{REQUEST_URI} -f
RewriteRule .* drupal/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* drupal/index.php?q=$0 [QSA]
I changed 'mysite.com' to my domain name. I changed 'drupal' to 'DRUPAL'.
(2) Edit DRUPAL/.htaccess
"<IfModule mod_rewrite.c>" is replaced by <IfModule XXXmod_rewrite.c>
(3) Edit DRUPAL/sites/default/settings.php
But here, as "$base_url = 'http://www.mysite.com';" is already asterisked out, no action is needed.
But try as i might, it does not work.
Can anyone please help? Thank you a lot for averting premature grey hair.
I installed drupal in my subdirectory http://www.mysite.com/www/DRUPAL
Currently i am accessing it as www.mysite.com/DRUPAL
I would like it to be accessed as www.mysite.com
.......
In this regard, i found and tried the following piece of code. It works for many others but I am not sure why it does not work for me.
.......
The steps are:
(1) Edit the root .htaccess
I deleted off the existing contents:
Options +Indexes
php_value error_reporting 7
php_flag display_errors off
I added the following:
Options -Indexes
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^www\.mysite\.com$ [NC]
RewriteRule .* http://www.mysite.com/ [L,R=301]
RewriteRule ^$ drupal/index.php [L]
RewriteCond %{DOCUMENT_ROOT}/drupal%{REQUEST_URI} -f
RewriteRule .* drupal/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* drupal/index.php?q=$0 [QSA]
I changed 'mysite.com' to my domain name. I changed 'drupal' to 'DRUPAL'.
(2) Edit DRUPAL/.htaccess
"<IfModule mod_rewrite.c>" is replaced by <IfModule XXXmod_rewrite.c>
(3) Edit DRUPAL/sites/default/settings.php
But here, as "$base_url = 'http://www.mysite.com';" is already asterisked out, no action is needed.
But try as i might, it does not work.
Can anyone please help? Thank you a lot for averting premature grey hair.