cmeinck
Well-known member
A few weeks back, I asked my host to switch from Litespeed back to Apache. This due to the issues affecting CSS breaking and Litespeed seemingly slow to provide a patch. In any event, when my host did the move, the site completely broke. Nasty 500 errors. They blamed it on my .htaccess, so now I'm taking a good hard look to see if there are some lingering issues there that I should correct. Here's what I have as of now:
After this I have numerous 301 directs, that look like this:
Redirect 301 /forum/category http://www.mysite.com/forum/forums/category
Looking at the default XF htaccess, I'm not sure if this piece is a duplicate of sorts.
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Should I have my vbSEO rewrites at the top? Finally, is my code for redirecting to the www version of my forums correct?
Anything here that might be messing with Apache, but would cause it to work with Litespeed?
Code:
# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule [^/]+/.+-([\d]+)-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/.+-([\d]+).html showthread.php?t=$1 [NC,L]
RewriteCond %{HTTP_HOST} !^www\.mysite\.com
RewriteRule (.*) http://www.mysite.com/forum/$1 [L,R=301]
# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo
# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
After this I have numerous 301 directs, that look like this:
Redirect 301 /forum/category http://www.mysite.com/forum/forums/category
Looking at the default XF htaccess, I'm not sure if this piece is a duplicate of sorts.
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Should I have my vbSEO rewrites at the top? Finally, is my code for redirecting to the www version of my forums correct?
Anything here that might be messing with Apache, but would cause it to work with Litespeed?