.htaccess advice

Hi Guys and girls!

 

Just a quick question, if I modify the .htaccess file with a redirect:

We are currently running Drupal 6, not sure what version - not sure how to find that info!
If I modify the .htaccess and add in a redirect, will this be overwritten by an update, or will it update the Drual part of the .htaccess, and leave everything else?

Thanks!
Jay 

inetdigital's picture

Hi Jay,A core update will

Hi Jay,

A core update will overwrite all core files - .htaccess, robots.txt .etc. make sure you have a version saved away or in a repository.

Ed 

Better to use apache config

Better to use apache config files if possible (i.e. if you're not on shared hosting.)  Otherwise yes, any changes to .htaccess will be lost.  The .htaccess included with Drupal only changes very rarely, so in general you could probably keep using your old copy.

Use redirect module

Another option would be to do your redirect inside Drupal, e.g. with http://drupal.org/project/path_redirect or code your own.  Much lower performance than using Apache, so if you're expecting a lot of traffic to urls which need to be redirected, maybe not a good idea.