- Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_URI} !main [NC]
RewriteRule !\.(js|ico|gif|jpg|png|css|zip|pdf|xml|html|gz|flv|swf|mp4)$ /index.php
RewriteRule ^(files).*$ index.php
<Directory /pub/www/main>
RewriteEngine On
RewriteBase /main/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /main/index.php [L]
</Directory>
I have tried several mutations of the top section that worked in an .htaccess in my testing directory in ~myuser, but not in the actual Vhost definition. Most notably:
- Code: Select all
RewriteEngine on
RewriteCond %{REQUEST_URI} springsavings
RewriteRule ^(.*)$ main [L]
RewriteCond %{REQUEST_URI} !main [NC]
RewriteRule !\.(js|ico|gif|jpg|png|css|zip|pdf|xml|html|gz|flv|swf|mp4)$ /index.php
RewriteRule ^(files).*$ index.php
All I really want this to add functionally is if the user calls /springsavings it redirects to /main... or even / which then in turn directs to main via some code in index.php. However it seems that code doesn't really do anything at the moment.