Reputation: 23542
I want
http://kemtime2_neu.pr.domain.de/css/style.css
to open as http://kemtime2_neu.pr.domain.de/public/css/style.css
and http://kemtime2_neu.pr.domain.de/login
to open as http://kemtime2_neu.pr.domain.de/public/index.php/login
I have
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /public/index.php/$1 [L]
This works for 2.
How do I make it work for 1.? Note that I can not change the document root (sorry!).
Upvotes: 1
Views: 2702
Reputation: 23542
Found it:
# Redirect to static content
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond /var/www/de/domain/pr/kemtime2_neu/public%{REQUEST_URI} -f
RewriteRule ^(.+)$ /public/$1 [L]
# otherwise redirect to script
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /public/index.php/$1 [L]
Upvotes: 2