1

In /etc/httpd/conf.d for custom conf file where you have multiple sites and databases but with different systems installed in non root folders can you declare more than one rewrite rule like below? I am getting errors with xml not being read to install extensions for joomla and not finding it in tmp folder even though permissions and ownership are correct so think it must be the conf file settings. I don't use .htaccess. Yet if I install extensions via a system install extension it works.

<Directory /var/www/html/folder1>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^index.php [L]

</Directory>

   <Directory /var/www/html/folder2>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^/(.*)$
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^index.php [L]

</Directory>

1 Answer 1

0

This is a perfectly valid configuration, though you could simplify it by using a DirectoryMatch or an include file since the code is the same in each

<DirectoryMatch "^/var/www/html/(folder1|folder2)">
   ...
</DirectoryMatch>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .