Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exclude a folder on Drupal site so that Drupal does not recognise it its own?

I am running a site xyz.org in Drupal.

Now I want to install some other modules such as PHPBB forum and Coppermine gallery. When I install these, and try to access the link xyz.org/gallery, it gives me drupal error.

"Page not found"

What settings I need to change in order to let drupal know that /gallery is not a drupal node?

like image 469
Ruchir Agarwal Avatar asked Dec 08 '22 03:12

Ruchir Agarwal


1 Answers

Take a look at your current .htaccess config. If might have the following lines:

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

Those contain most of the URL rewriting that matters. The first three conditions say that all URLs will be rewritten except for existing files, directories and a request for /favicon.ico You can add your own favourite conditions there. For example, to avoid rewriting for urls of the form /gallery/.*:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !^/gallery/.*$
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
like image 151
KT. Avatar answered Jan 11 '23 18:01

KT.