views:

95

answers:

3

Hi friends,

I'm a drupal newbie...

I completed my first drupal site. then client wanted to run their old CRM under new drupal site, they uploaded CRM folder into drupal folder, and when I try to address the CRM admin, as below, it redirects drupal 404 page (which is search page).

www.blablabla.com/crm/admin

Error message from drupal is below:

The page you requested does not exist. For your convenience, a search was performed using the query 500 shtml.

is there any way that I can make drupal to ignore any folder under its folder? something via .htaccess, or I don't know :/

Appreciate helps so much! thanks a lot!

+4  A: 

I would suggest just linking to the old cms from inside drupal.And keep the folders of the old cms outside of the drupal folders. Your old cms also probably doesn't reference the links correctly (its expecting http://oldcmslink and inside of drupal it would be http://drupal?q=something).

controlfreak123
maybe i can make sth like subdomain. http://crm.blablabla.com
artmania
maybe that would work but I'm not sure how that would fix the links not being right.
controlfreak123
+1 for keeping different systems in different folders - no use in trying to manage the resulting mess if one doesn't ;)
Henrik Opel
@artmania: Using a subdomain would be a proper solution *if the subdomain uses its own document root*. Then you can just put the old CRM there and the two systems are separated cleanly. (This would also prevent any path/URL clashes that might occur otherwise.)
Henrik Opel
A: 

You'd have to make a mod_rewrite rule in your .htaccess file. Drupal directs (almost) all its requests to index.php which then sends requests to Drupal's menu router. So your CMS is never going to work unless you create a rewrite rule.

But I would take controlfreak123's advice if you can and move your old CMS site to another address. You're going to have to maintain your own version of Drupal's htaccess file and deal with this work around every time you upgrade. There is also a small chance you might have name collisions later on if you add new modules etc.

Rimian
+2  A: 

Drupal use these lines in the .htaccess file.

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

To use a sub-directory below, you will need to either add a RewriteRule before this with the [L] attribute or add your subdirectory to the RewriteCond list here, such as:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/crm/ # Ignore Drupal Redirects for our CRM.
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Phil