Whenever I uncomment the ScriptAliasMatch
line, I get a 500 error. I am not sure why this is. Everything, to me, looks correct. The error log says that ScriptAliasMatch is not all开发者_如何学Cowed their.
AddHandler application/x-httpd-php5s .php .css .xml
Options -Indexes
# Environment Variables
SetEnv INCLUDES /home1/tylercro/public_html/includes/
SetEnv SITE_ROOT /home1/tylercro/public_html
# Error Documents
ErrorDocument 400 /400/
ErrorDocument 401 /401/
ErrorDocument 403 /403/
ErrorDocument 404 /404/
ErrorDocument 500 /500/
RewriteEngine On
# Take off a the end script name if it is an index page.
RewriteCond %{REQUEST_URI} (.*)(index|default)\.\w{1,5}$ [NC]
RewriteRule .* %1 [R=301]
# Force "/" at end of URL if directory.
RewriteRule (.*)!(\.\w{1,5}$) $1 [R=301]
# ScriptAliasMatch ^/gallery/([^/]+)/?$ /home1/tylercro/public_html/gallery/?tag=$1
Assuming this is in .htacces, ScriptAliasMatch
is only valid in the server config or VirtualHost. It cannot be used in a .htaccess file.
精彩评论