Is it possible to install Drupal into a specific non-root directory and not have that info in the links for public access?

Example: If the install directory is /apps/drupal/ and I have a directory /contact/ in the root, can the link to 'contact' be domainname.com/contact/?

Comments

alexrayu’s picture

Yes. Just edit your htaccess file in the Drupal root. Add a RewriteBase /

- Alexei Rayu.

Drupal Related Services | SiteHound Drupal - Easy Drupal for Beginners v 1.3 (based on Drupal 5.10) - Free Download

gulliver’s picture

Thanks. Being new to this, do I literally add RewriteBase / to the .htaccess?

And, as the current install is currently in the root, can I simply create a new non-root directory and shift everything into it - and if so, what settings etc do I need to alter?

UPDATE: I created a directory 'drupal' and shifted everything into it.

The .htaccess in 'drupal' has RewriteBase /drupal, but everything is now domain.com/drupal/news/etcetera.

I want it to be domain.com/news/etcetera - but with the Drupal install files/folders all within that non-root 'drupal' directory.

Can that be done, with a non-root install?

shobika’s picture

yes, but anyhow you can always link the folder contact from any point irrespective of the drupal install... is there anything specific about it?

gulliver’s picture

Thanks. No there's nothing specific about that directory - just an example.

alexrayu’s picture

RewriteBase / is a mighty tool to help deal with unlucky paths. But nothing is as good as running Drupal from the root folder =)

- Alexei Rayu.

Drupal Related Services | SiteHound 2.0 (based on Drupal 6.4) - Free Download. Please test and comment.

gulliver’s picture

Thanks.

And as detailed in http://drupal.org/node/296026#comment-971398, there are other not-so-good-from-root issues to consider.