[Resolved] vBulletin 4 Home Page Sometimes Malformed

Status
Not open for further replies.
#1
I'm currently working on the 15 day trial with Litespeed. I have cache configured to ramdisk and it's working great! Since migrating from Apache, my sever load dropped from an average of 3.0 to 0.4 - we have a lot of guest visitors, so caching them has made our database very happy :) Also, we used to get Out Of Memory errors, and now the memory usage is at 300MB (out of 5GB)! I don't what magic you people did, but it's amazing and now I need to downgrade my VPS plan.

My only problem is that sometimes the forum.php page does not render when I load as a guest. New incognito window in Chrome and going to the site, it'll occasionally look like this:



Then I refresh and it looks completely fine. But then if I close out of the incognito window, open a new incognito window, and load the site, it's broken again.

I did a View Page Source for both the correct / incorrect page, and a diff shows the source code to be identical.

It's not all the time, but I'd say at least half the time it does this, so obviously I need to fix whatever the problem is before re-enabling LS Cache.

Note: This also happens frequently if I open the homepage, then click to open a forum/thread, and then click homepage again. The homepage will start out fine, but after going to a forum/thread and back to the homepage, it suddenly looks like above.

Any ideas? Here is my htaccess:

Code:
php_flag display_errors off

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mysite.com$ [NC]
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R=301,L]

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

RewriteCond %{HTTP_COOKIE} !bbimloggedin=yes
RewriteCond %{HTTP_COOKIE} !bbimloggedin=
RewriteCond %{HTTP_COOKIE} !bbimloggedin=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^/(login|register|usercp|private|profile|cron|image)\.php$
RewriteCond %{REQUEST_URI} !^/admincp
RewriteCond %{REQUEST_URI} !^/modcp
RewriteRule (.*\.php)?$ - [E=Cache-Control:max-age=120]
If I can get this fixed, I'm very excited to purchase the 2-CPU License this week!

Thanks
 
Last edited:
#2
If you leave me alone in a corner for long enough, I'll usually figure out what I screwed up :) The problem was running force https rules AFTER the cache logic in .htaccess - moved it up above, and everything works fine now.

Thanks!
 

NiteWave

Administrator
#3
Thanks for the sharing! so above rewrite rules is the final working rules. Yes, redirect rules should put before cache rules.

p.s. for
Code:
RewriteCond %{HTTP_HOST} !^www.mysite.com$ [NC]
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} http://www.mysite.com$ [NC]
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R=301,L]
see if following one works:
Code:
RewriteCond %{HTTP_HOST} !^www.mysite.com$ [NC,OR]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R=301,L]
 
Status
Not open for further replies.
Top