Given my current .htaccess file, how do I change it to check for an additional url like '/ src / pub /' and rewrite it to '/' without affecting the current rewrite?
Here is the source .htaccess file:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]
and here is my recent attempt (which does not work):
RewriteEngine on RewriteRule ^/src/pub/(.*)$ /$1 [R] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?route=$1 [L,QSA]
Edit: Here are some examples of what I want to accomplish:
New additional rule:
From: http://www.mysite.com/src/pub/validfile.php To: http://www.mysite.com/validfile.php From: http://www.mysite.com/src/pub/user/detail/testuser To: http://www.mysite.com/user/detail/testuser
Existing rule (already working):
From: http://www.mysite.com/user/detail/testuser To: http://www.mysite.com/index.php?route=user/detail/testuser
Wilco source share