分页: 1 / 1
rewrite
发表于 : 2009年 2月 11日 07:16
由 kesor
生成的.htaccess 好像不能用
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
提示:
无法启用重写功能, 请检查你的服务器设置
而我的wordpress是可以的
Re: rewrite
发表于 : 2009年 2月 11日 08:38
由 joyqi
你直接将url中的index.php去掉访问,会得到什么页面?
Re: rewrite
发表于 : 2009年 2月 11日 09:04
由 wareunix
呵呵
我是这样做的:
LoadModule rewrite_module modules/mod_rewrite.so
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>
Re: rewrite
发表于 : 2009年 2月 11日 21:00
由 kesor
[quote="70"]你直接将url中的index.php去掉访问,会得到什么页面?[/quote]
404 Not Found
Re: rewrite
发表于 : 2009年 2月 11日 22:57
由 joyqi
这可能是你的rewrite模块没有启用的缘故,要不然起码也应该是一个500的页面,不会出现404
或者是楼上的wareunix说的
没有将设置此目录下的
AllowOverride All
Re: rewrite
发表于 : 2009年 2月 12日 07:36
由 wareunix
修正下,要修改这里:
<Directory "D:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
#
http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All #
这里 #
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
Re: rewrite
发表于 : 2009年 3月 23日 02:46
由 kesor
把wp的.htaccess抄了来
代码: 全选
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
区别只在rewrite规则最后一行
wordpress[list]RewriteRule . /index.php [L][/list:u]
typecho[list]RewriteRule ^(.*)$ /index.php/$1 [L][/list:u]
我把wp的.htaccess上传到typecho根目录,现在运行正常……
Re: rewrite
发表于 : 2009年 3月 23日 07:07
由 joyqi
这个特性将在0.6版得到支持,系统会先用typecho风格的.htaccess测试,然后使用wordpress风格的.htaccess测试
兼容性将更好
Re: rewrite
发表于 : 2009年 4月 5日 19:50
由 mayagamer
很人性化,充分考虑了WP迁移过来的人
Re: rewrite
发表于 : 2009年 6月 3日 20:40
由 kesor
没错,0.6做到了