Mobile app version of vmapp.org
Login or Join
Heady270

: Add an exception to Joomla's .htaccess rewrite rules to allow an Owncloud subdirectory i'm actually use Joomla in our website and i would like to add Owncloud. The .htaccess in the root let

@Heady270

Posted in: #Apache #Htaccess #Joomla

i'm actually use Joomla in our website and i would like to add Owncloud.
The .htaccess in the root let Joomla side works without trouble:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/Joomla3
RewriteRule ^(.*)$ Joomla3/ [L]


But if want to access the owncloud service, i get this error:


The requested URL /Joomla3/owncloud/ was not found on this server.


It seems the original rewrite works with the owncloud directory too.
my host is composed by 1 root directory and the 2 subdirectory:


-root
--Joomla
--Owncloud


How can I set .htaccess to


rewrite URL from my website (example.com) into example.com/Joomla access owncloud (without rewrite) in the directory example.com/owncloud

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Heady270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

RewriteCond %{REQUEST_URI} !^/Joomla3
RewriteRule ^(.*)$ Joomla3/ [L]



What these directives do is... if the requested URL does not start "/Joomla3" then internally rewrite the request to the "Joomla3" folder.

What you need to do is add another condition to state that... if the requested URL does not start "/Joomla3" and it does not start "/owncloud" then internally rewrite the request to the "Joomla3" folder.

For example, this could be achieved by adding a second RewriteCond (condition) directive:

RewriteCond %{REQUEST_URI} !^/Joomla3
RewriteCond %{REQUEST_URI} !^/owncloud
RewriteRule ^(.*)$ Joomla3/ [L]


RewriteCond directives are implicitly AND'd.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme