Recently if I even replace my htaccess file with an exact copy, it throws my entire site into a 500 internal error. Tried calling tech support but they basically gave me the "we don't support anything" statement.
Can you post your .htaccess here, and tag me so i get notified.
# vim: set ts=2 sw=2 sts=2 et:
#
# Apache/PHP settings
#
# @author Qualiteam software Ltd <info@x-cart.com>
# @copyright Copyright (c) 2010-2014 Qualiteam software Ltd <info@x-cart.com>. All rights reserved
# @license http://www.x-cart.com/license-agreement.html X-Cart 5 License Agreement
# @link http://www.x-cart.com/
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !=wholesale.glaspak.com [NC]
RewriteCond %{HTTP_HOST} !=dev.glaspak.com [NC]
RewriteCond %{HTTP_HOST} !=sdx.glaspak.com [NC]
RewriteRule ^(.*)$ https://glaspak.com/$1 [NC,R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTP_HOST} !=wholesale.glaspak.com [NC]
RewriteCond %{HTTP_HOST} !=dev.glaspak.com [NC]
RewriteCond %{HTTP_HOST} !=sdx.glaspak.com [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* ? [F,L]
Options -Indexes
DirectoryIndex cart.php index.php
#DirectoryIndex index.htm
ErrorDocument 404 /404.php
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
RewriteRule (^|/)\. - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^sitemap.xml(\?.+)?$ cart.php?target=sitemap&index=1 [NC,L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^((([/_a-z0-9-]+)/)?([_a-z0-9-]+)/)?([_a-z0-9-]+)(/?)(\.([_a-z0-9-]+))?$ cart.php?url=$5&last=$4&rest=$3&ext=$7 [NC,L,QSA]
#RewriteBase ____WEB_DIR____
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
# Perhaps better to whitelist expires rules? Perhaps.
ExpiresDefault "access plus 1 month"
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest "access plus 0 seconds"
# Your document html
ExpiresByType text/html "access plus 0 seconds"
# Data
ExpiresByType text/xml "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
# Feed
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
# Favicon (cannot be renamed)
ExpiresByType image/x-icon "access plus 1 week"
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
# HTC files (css3pie)
ExpiresByType text/x-component "access plus 1 month"
# Webfonts
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
# CSS and JavaScript
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
<IfModule mime_module>
AddType application/x-httpd-ea-php70 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
You have used "RewriteEngine on" twice. This must be causing the error.
Try removing the 2nd word and check. Still if these continues post only the custom code you've added in the file. Don't post the code pre-added by Godaddy
Nope the site is running right now and that is the current htaccess
I added
RewriteCond %{HTTP_HOST} !=test.glaspak.com [NC]
Under both of the
RewriteCond %{HTTP_HOST} !=sdx.glaspak.com [NC]
and then when I uploaded the htaccess file the entire site threw a 500 error. I then restore the previously working htaccess and the 500 error didn't resolve.
hello @glaspak,
Thank you for posting your htaccess file. after reviewing your configuration iv'e noticed you have an extra
</IfModule>
on line 83.
Remove this and see if that fixed your internal server error.
____
RewriteEngine on
RewriteEngine on
Will not cause an internal server error, this will only enable the setting as many times as you set it.
This is caused when you might messed up something in the code. So I suggest you should post your .htaccess code so we can look into it figure out.