Clean URLs on Media Temple’s Grid-Service (gs)

by Jonathan Christensen on Aug 09, 2009, 9:53 PM

Noticing the amount of questions of “clean urls” being brought up on Media Temple’s Grid Server platforms, made a point that there should be a clean and easy write up to get this working without having lots of foreknowledge about the PHP/Apache system. This mainly applies to any site running a content management system, such as Drupal which this write up mainly focuses on!

First of all before we start editing any important server settings, you should make sure this will not interupt any modules or older versions. If you are unsure on what Clean URL’s do to a Drupal configuration, proceed to this page:
http://drupal.org/node/15365

After reviewing if this fits into your current Drupal release (5+) lets proceed. In preparation there are three things that are needed to complete this task! These three items are the following:

  • Admin / FTP access to the root of your MT:GS server
  • FTP Client
  • Text Editor

Lets begin shall we, below are listed steps for you to follow so that you also can get your server setup.

  1. Lets start off by logging into your grid service admin panel.
    http://ac.mediatemple.net

  2. Then navigate to your root domain’s WebControl Panel and locate “PHP Settings”, then find your particular domain that you are installing drupal under and choose the radio button for “PHP 5″.

  3. Once the server eviroment is set to PHP version 5, lets start to open your FTP client and log in. Move into your domains “html” root folder. You should see lots of files, however you are looking for the item “.htaccess”.

    If your FTP client has a built in text-editor, open the file “.htaccess” and append the following:

    1
    2
    3
    4
    5
    
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

  4. Save the file, and open a browser to your admin panel of Drupal. Under the “site configuration” section, click on “clean urls” and enable that function.

Once that is enabled, reload the page and notice how the URL bar is now clean without all the file extensions and loaded variables. After testing, if the new settings are affecting your custom modules follow the same steps and remove the modifications dont to your Drupal installation.

Tags: , , , ,

Comment

All Fields Required

Bonjour!

We noticed this is your first time visiting Riot Riot™!

Our site is currently still under development, please keep that in mind while browsing our content! If you have any questions regarding our site or our services please feel free to use our contact form!

Regards, (rr) Team