我一直在努力让FURL在MODx中工作。以下资源详细介绍了此主题 - http://rtfm.modx.com/display/revolution20/Using+Friendly+URLs。但是,一旦对.htaccess进行了更改,该站点就不再可用。这是我的.htaccess文件:
# Friendly URLs Part
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} .
# Force all pages to go to www.domain.com for SEO
RewriteCond %{HTTP_HOST} !^www\.dev\.domain\.co\.uk [NC]
RewriteRule (.*) http://www.dev.domain.co.uk/$1 [R=301,L]
# Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Additional Settings Follow
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
BrowserMatch "MSIE" brokenvary=1
BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
BrowserMatch "Opera" !brokenvary
SetEnvIf brokenvary 1 force-no-vary
任何想法可能是什么问题?
答案 0 :(得分:0)
将.htaccess
更改回原始版本 - https://github.com/modxcms/revolution/blob/develop/ht.access
答案 1 :(得分:0)
尝试将此默认htaccess文件用于modx
RewriteEngine On
RewriteBase /
#RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.example.com [NC]
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.example.com when your cert only allows https://secure.example.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example.com/$1 [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
检查this中是否有完整的htaccess文件