我在php中启用了shorturl ..我收到了404错误.. 我的htaccess是
######################################
## [PHPFOX_HEADER]
##
## @copyright [PHPFOX_COPYRIGHT]
## @author Raymond Benc
## @package PhpFox
## @version $Id: htaccess.txt 4580 2012-07-31 15:19:24Z Raymond_Benc $
######################################
# Options -Indexes
# Header unset Pragma
# FileETag None
# Header unset ETag
# URL Rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
#
# Full path to your site
#
RewriteBase /
# Rename Photo Names
# RewriteRule ^file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)_([0-9]*?)\.(.*)$ file/pic/photo/$1/$2/$3_$5.$6
# RewriteRule ^file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)\.(.*)$ file/pic/photo/$1/$2/$3.$5
#
# Rules
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?do=/$1
# Image Access Protection
# RewriteRule ^file/pic/photo/(.*)\.(.*)$ static/image.php?file=$1&ext=$2
</IfModule>
# Modify Headers
<IfModule mod_headers.c>
# Cache files
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">
Header set Cache-Control "public"
Header set Expires "Mon, 20 Apr 2015 20:00:00 GMT"
Header unset Last-Modified
</FilesMatch>
# Cache JavaScript & CSS
<FilesMatch "\.(js|css)$">
Header set Cache-Control "public"
Header set Expires "Mon, 20 Apr 2015 20:00:00 GMT"
Header unset Last-Modified
</FilesMatch>
</IfModule>
# Compress JavaScript & CSS
<IfModule mod_deflate.c>
<FilesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
我已将htaccess.txt更改为.htaccess
在/include/setting/server.sett.php
我已将$_CONF['core.url_rewrite'] = '2';
更改为$_CONF['core.url_rewrite'] = '1';
答案 0 :(得分:0)
请确保您的网络服务器中已激活mod_rewrite