I've got a somewhat standard .htaccess
for removing index.php
from my EE1 URLs:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteCond %{QUERY_STRING} ^(utm_source=.*)
RewriteRule ^(.*)$ /index.php?/ [L,PT]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ /index.php?/$1&%1 [L]
What I need to do is redirect calls to a subfolder (/store
) to a new subdomain (store.example.com
). So I added this line at the top:
Redirect 301 /store http://store.example.com/
Unfortunately, the end result is that I get redirected to http://store.example.com//?/store/
I've tried a few variations, such as moving the line to the bottom, but nothing worked properly.
How can I do a 301 redirect (using .htaccess
) without including the extra /?/store/
bit at the end?