2015-05-03 14:56:41 +02:00
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
RewriteEngine on
|
2014-11-11 17:01:24 +01:00
|
|
|
|
2015-05-03 14:56:41 +02:00
|
|
|
RewriteBase /
|
2014-11-11 17:01:24 +01:00
|
|
|
|
2015-05-03 14:56:41 +02:00
|
|
|
# only if the requested file does not exists
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
2014-11-11 17:01:24 +01:00
|
|
|
|
2015-05-03 14:56:41 +02:00
|
|
|
# Store the current location in an environment variable CWD
|
|
|
|
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
|
|
|
|
RewriteRule ^.*$ - [E=CWD:%2]
|
2014-11-11 17:01:24 +01:00
|
|
|
|
2015-05-03 14:56:41 +02:00
|
|
|
# Just by prefixing the environment variable, we can safely rewrite anything now
|
|
|
|
RewriteRule ^([^/]*) %{ENV:CWD}index.php?database=$1 [QSA,L]
|
|
|
|
</IfModule>
|