Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_HOST}!^secure.mydomain.com
rewriterule ^(.*)$ [secure.mydomain.com...] [R=301,L]
When I enter www.mydomain.com in the browser, I get the following after the rewrite...
[secure.mydomain.com...]
Notice the ugly trailing slash? Any way I can use a different rule that will eliminate that?
If your code is installed in httpd.conf then this will happen because the code was intended for use in .htaccess.
For use in httpd.conf, use either:
RewriteRule ^(.*)$ https://secure.mydomain.co[b]m$1[/b] [R=301,L]
RewriteRule [b]^/([/b].*)$ https://secure.mydomain.com/$1 [R=301,L]
Jim