Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache mod_rewrite issue (RESOLVED)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Akaihiryuu
l33t
l33t


Joined: 08 May 2003
Posts: 751
Location: Columbus, OH

PostPosted: Sat Apr 01, 2017 3:15 pm    Post subject: Apache mod_rewrite issue (RESOLVED) Reply with quote

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
View user's profile Send private message
Akaihiryuu
l33t
l33t


Joined: 08 May 2003
Posts: 751
Location: Columbus, OH

PostPosted: Mon Apr 03, 2017 12:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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