I'm wanting to move my personal blogging site back to the root of the domain, then turn on clean url's and then upgrade from 5.7 to 6.2.

My typical node url's are like so:

http://superjacent.net/cms/?q=node/837

I will be removing the sub-directory "/cms" from the url and non clean url part "?q=". The above url will eventually be like so:

http://superjacent.net/node/837.

Can someone suggest how the RewriteRule should be written to remove the sub-directory and non clean url part.

Comments

matt_harrold’s picture

If you move your Drupal installation out of the cms folder (into the root folder) ... the url paths will automatically change. They are stored relative to Drupal root ... where ever that may be.

As for the CleanURL rewrite rule .... once in your root folder, if your server has mod_rewrite ... the default .htaccess file (shipped with Drupal) should have everything you need already.

This is snipped directly from the default Drupal .htaccess file:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

superjacent’s picture

Sorry, I didn't explain myself clearly. I don't want to lose any hits to my site that are using the old links and so in the .htaccess file, I'll need to rewrite those old style links to the new style links.

___________________________

Steven Taylor
http://prime357.org

cpugeniusmv’s picture

You should be able to just do something like

Redirect /cms http://superjacent.net/

since non-clean URLs still work when clean URLs are enabled. That is, unless you specifically want everyone to start using clean URLs.