XF 1.5 Need help with htaccess and unifying my url structure please

sross

Active member
I think my htaccess may be a mess. Some are getting dead links and logged out due to inconsistent urls. I have https which may be complicating things.

I have htaccess in public html with:

Redirect permanent /index.html https://www.mysite.com/forum/home
RewriteCond %{HTTP_HOST} ^mysite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mysite\.com$

and htaccess in forum root I tried this:

RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R=301,L]

Seems to cause problems as anything www.sitename/forum/results will = page not found.

Can anyone clarify what I should have in public_html htaccess and forum htaccess? The final result should always be forced to https://www

Thanks!!
 

Mike

XenForo developer
Staff member
All of your canonicalization stuff seems to work as I'd expect. You mention the "results" URL, but that's not a valid XF URL by default, so returning a 404 would be expected. What are you expecting to see there?
 
Top