One of the things mentioned at MivaCon this year was the idea of streamlining the .htaccess file as much as possible, to speed up server response time. With some help from Miva I started moving my .htaccess rules over, but some won't work. Maybe someone here has some ideas?
In .htaccess this works fine:
With the idea being that if someone visits example.com/example- they get redirected to example.com/example/ (just adding the trailing slash). Then the trailing slash version of the URL gets rewritten behind the scenes (to mm5/merchant.mvc?Screen=example). When I move this over to vhost I hit a couple of snags:
In .htaccess this works fine:
Code:
RewriteRule ^example$ /example/ [L,R=301] RewriteRule ^example/$ mm5/merchant.mvc?Screen=example [QSA]
- It turns into an infinite loop of redirects (the server stops it at 10), because the first rule is always triggered.
- After I comment out the first rule, I get a "Bad Request" 400 error:
Bad Request Your browser sent a request that this server could not understand. Client sent malformed Host header- I also tried:
Code:RewriteRule ^/example/$ /mm5/merchant.mvc?Screen=example [QSA]
Unable to execute 'example/': No such file or directory
- I also tried: