Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- Why do I get a 500 error on remote server but not on localhost?


EvertVd - 2:05 pm on Apr 19, 2011 (gmt 0)


I am probably too tired to see straight, but for some reason i get a 500 error when I upload this htaccess, while it works ok on my WAMP server.
Does anyone see what could be the problem?


# ---------------------------------------------------------
# Some extra security
# ---------------------------------------------------------

<Files ".htaccess">
order allow,deny
deny from all
</Files>

Options +FollowSymLinks

# ---------------------------------------------------------
# Prevent directory browsing & access to .dirs
# ---------------------------------------------------------

Options -Indexes
IndexIgnore *

<IfModule mod_rewrite.c>
RewriteRule "(^|/)\." - [F]
</IfModule>

# ---------------------------------------------------------
# Scripts
# ---------------------------------------------------------

Options +ExecCGI
AddHandler cgi-script cgi

Options +Includes
XBitHack on

# ---------------------------------------------------------
# Make sure we show te right page
# ---------------------------------------------------------

DirectoryIndex index.php index.html

# ---------------------------------------------------------
# MIME types (partly from html5 boilerplate)
# ---------------------------------------------------------

AddType audio/ogg oga ogg spx
AddType audio/flac flac
AddType video/ogg ogv
AddType video/mp4 mp4
AddType video/webm webm
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType font/opentype otf
AddType application/x-font-woff woff
AddType image/x-icon ico
AddType application/x-httpd-php inc

# ---------------------------------------------------------
# Set Charset and Headers
# ---------------------------------------------------------

AddCharset UTF-8 .htm .html .php .inc .css .js .xml .json .rss

<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
<FilesMatch "\.(html|htm|php)$">
BrowserMatch MSIE ie
Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
Header set imagetoolbar "no" env=ie
</FilesMatch>
Header append Vary User-Agent
</IfModule>
</IfModule>

# ---------------------------------------------------------
# Configure cache-ing (css is dynamic)
# ---------------------------------------------------------

<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 years"
<FilesMatch "\.(htm|html|xml|txt|php|inc)$">
ExpiresDefault "access plus 1 seconds"
</FilesMatch>
</ifModule>

<ifModule mod_headers.c>
Header unset ETag
Header unset Last-Modified
</ifModule>

FileETag None

# ---------------------------------------------------------
# Compression
# ---------------------------------------------------------

<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|htm|html|xml|inc|php|ttf|otf|eot|svg)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

# ---------------------------------------------------------
# Custom errors
# ---------------------------------------------------------

Options -MultiViews


Thread source:: http://www.webmasterworld.com/apache/4300392.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com