I have been trying to enable Clean URLS on a site hosted by Media Temple' s Grid Server.
I contacted thier tech support andthis was their answer:
----------
mod_rewrite is enabled on all of our server lines. Our Knowledge Base has a good article on the subject:
http://kb.mediatemple.net/article.php?id=085
In order to use mod_rewrite on an (mt) (gs) Grid Server platform, you must first add a line to your .htaccess where your RewriteRules are. To do this, simply locate your .htaccess file with the mod_rewrite rules in it, and add the following line to it at the top:
Options +FollowSymLinks
RewriteEngine On
Now your mod_rewrite rulesets should take effect.
Please note that unless you do this in the top level .htaccess file, you may need to place this directive in each .htaccess file that has mod_rewrite rules. Also, mod_rewrite is considered to be a custom modification by (mt) Media Temple, and may not be supported beyond (mt) Media Temple verifying that mod_rewrite is available on your server and is working properly.
-----
I have tried to add the code above to my .htacess but it still does not work. I feel liek I am missing something. Does anyone have experience with this that can help provide more direction?
Thanks-
Comments
Clean URLS on MT
OK so I solved my own problem...
I was not able to make changes to the top level .htaccess file but in my subdomain folder {ie. subdomain.mysite.com}, I added this to the .htacess and it seemed to work.
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
What Works for me
Here is what works for me with media temple on the grid
I just put the drupal default .htaccess file in each of my html directories like
domains/domain1.com/html/.htaccess
domains/domain2.com/html/.htaccess
domains/domain3.com/html/.htaccess
Each of these is my default drupal .htaccess file included in the download. And, it just works. The grid does not have a problem with the provided drupal .htaccess file as long as it's in the root of your website.
--
Matt
http://www.mattfarina.com
Note:
If you have drupal installed in a sub-directory of your alternative, like:
domains/domain1.com/html/subdirectory/
Make sure that the .htaccess file that comes with drupal is up into your drupal installation directory.
If drupal is installed in:
domains/domain1.com/html/
then the .htaccess should be in:
domains/domain1.com/html/.htaccess
If drupal is installed in:
domains/domain1.com/html/subdirectory/
then the .htaccess should be in:
domains/domain1.com/html/subdirectory/.htaccess
__________________________________________________________
Running// Mac OS X 10.4.8 // PHP 5.2.0 // MySQL 4.1.21 // Apache 1.3.33 //
Be.Happy.
Extra Code Worked!
I was having a heck of a time getting clean URLs enabled on Media Temple (gs) until this post...
Turned out the .htaccess file I was uplaoding had a whole bunch of extra syntax in it... I deleted it and added:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Works great now.
Switch to Php 5 Erased .htaccess
Here's what I found, I had drupal installed fine, but then switched site from php4 to php 5 from within the MT Account Manager. After that my .htaccess file only contained one line
AddHandler php5-script .php
I'm assuming that the upgrade process overwrote the .htaccess file that came with the Drupal install.
To fix it, I opened a local copy of the default Drupal .htaccess file, pasted that line at the top and then uploaded it to the MT server.
That seemed to do the trick for me and clean urls worked.
MT .htaccess does not get ovewritten by "tar xvf" command
I extracted Drupal 6 (testing) and everything went fine with "tar xvf". I did "view .htaccess" in my drupal folder and it has one line only...:-(
I did the same as aklump user above and that is working ...!
Thanks everyone.
Youssef