Skip to content

Instantly share code, notes, and snippets.

@GromNaN GromNaN/.htaccess
Created Jan 6, 2015

What would you like to do?
Bridge Wordpress & Symfony
<IfModule mod_rewrite.c>
RewriteEngine On
# Symfony2 URLs begins with app or admin/dashboard
RewriteRule ^app/ app.php [QSA,L]
RewriteRule ^admin/dashboard app.php [QSA,L]
# Others requests are redirected to Wordpress
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^index\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .? - [L]
# Rewrite all other queries to the front controller.
RewriteRule .? %{ENV:BASE}/index.php [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.