Håkan Olsson
Member
Hi,
SSL & without-"www" rewrites work well when loading html pages from root and subdiretories. However, when loading the XF board, none of the rewrites work, i.e., no switching to https and no "www" removal occurs.
Though, I can make it all work if I comment everything from (including) "<IfModule mod_rewrite.c>" to "</IfModule>".
in the XF's .htaccess -- but I suppose that is a bad way to solve it.
Code example (didn't work) used in root .htaccess:
Am I doing something apparently stupid here? If not, what would you try next?
/Thanks
SSL & without-"www" rewrites work well when loading html pages from root and subdiretories. However, when loading the XF board, none of the rewrites work, i.e., no switching to https and no "www" removal occurs.
Though, I can make it all work if I comment everything from (including) "<IfModule mod_rewrite.c>" to "</IfModule>".
in the XF's .htaccess -- but I suppose that is a bad way to solve it.
- Apache, shared
- XF files are in a subdirectory like root/xenforo
- The SSL & without-"www" rewrites are in root .htaccess.
- I've tried redirects recommended by the host and also by Brogan's faq with same result.
- The config.php https switch is set to 'on', placed at the end.
- Tried comment/uncomment "RewriteBase /xenforo" in XF's .htaccess
Code example (didn't work) used in root .htaccess:
Code:
# Brogans force https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Rewrite to domain without www
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule ^(.*) http://%1/$1 [QSA,L,R=301]
Am I doing something apparently stupid here? If not, what would you try next?
/Thanks