View previous topic :: View next topic |
Author |
Message |
Akaihiryuu l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 08 May 2003 Posts: 798 Location: Columbus, OH
|
Posted: Sat Apr 01, 2017 3:15 pm Post subject: Apache mod_rewrite issue (RESOLVED) |
|
|
I have a couple of things that I want to redirect from HTTP to HTTPS using mod_rewrite. One of them is working, the other isn't. This one works fine.
Code: | <Directory "/var/www/www.internal.lan/htdocs/phpmyadmin">
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}:8443%{REQUEST_URI} [R,L]
</Directory> |
An identical rule for a different dirctory is not redirecting. This makes no sense whatsoever, the rules are absolutely identical.
Code: | <Directory "/var/www/www.internal.lan/htdocs/roundcube">
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}:8443%{REQUEST_URI} [R,L]
</Directory> |
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Akaihiryuu l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 08 May 2003 Posts: 798 Location: Columbus, OH
|
Posted: Mon Apr 03, 2017 12:57 am Post subject: |
|
|
Ok, I found out there was an .htaccess in the roundcube directory conflicting with my mod_rewrite rule. Roundcube itself supports forcing HTTPS, so in defaults.inc.php I set force_https to 8443, and I don't need a rewrite rule for it after all. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|