该问题已被锁定!
19
关注
9318
浏览

伪静态困扰了好久,请教各位大侠指点

AI智能回复搜索中,请稍后...

查看全部 11 个回答

zxwlshy 初级会员 用户来自于: 广东省东莞市
2012-10-29 14:27
除了在.htaccess里面添加内容,还要在以下几个里面添加内容: 1, 按照系统提示安装Anwsion问答系统 2, 安装完成之后,修改对应网页服务器的配置文件 如果是你安装在网站根目录下: nginx:在对应的nignx.conf文件里面添加 location / { if (!-e $request_filename) { rewrite (.*) /index.php; } } Apache:在对应的httpd.conf或者.htaccess里面添加 
 RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php 
 IIS6 Rewrite组件:在对应的配置文件httpd.ini里面添加 CacheClockRate 3600 RepeatLimit 32 RewriteRule /static/(.) /static/$1 RewriteRule /uploads/(.) /uploads/$1 RewriteRule /(.*) /index.php/$1 如果你是安装在:您的域名/xxx/这样的目录下面,对应的配置文件分别为: nginx:在对应的nignx.conf文件里面添加 location /xxx/ { if (!-e $request_filename) { rewrite (.*) /index.php; } } Apache:在对应的httpd.conf或者.htaccess里面添加 
 RewriteBase /xxx/ RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /xxx/index.php 
 IIS6 Rewrite组件:在对应的配置文件httpd.ini里面添加 CacheClockRate 3600 RepeatLimit 32 RewriteBase /xxx/ RewriteRule /static/(.) /static/$1 RewriteRule /uploads/(.) /uploads/$1 RewriteRule /(.*) /xxx/index.php/$1 3, 以管理员身份登录,进入管理后台 => 全局 => 站点功能 => 开启 Rewrite 伪静态: 4, 在URL 自定义路由每行一条规则,中间使用===隔开,左边为站点默认 URL 模式,右边为替换后的 URL 模式, 链接以 / 开头, (:num) 代表数字, (:any) 代表任意字符。(未来版本会提供一些默认样式) 官网当前的样式规则参考: /home/explore/===/explore/ /home/explore/guest===/guest /home/explore/category-(:num)===/category/(:num) /home/users/===/users/ /account/login/===/login/ /account/logout/===/logout/ /account/setting/(:any)/===/setting/(:any)/ 5, 点击保存随即启用伪静态

关于作者

问题动态

发布时间
2012-09-21 17:05
更新时间
2012-10-29 14:54
关注人数
19 人关注

相关问题

请教大侠+area.js的省和城市怎么对应起来的?
请教一下搜索不到关键字的问题
iis7.5的伪静态规则
Rewrite伪静态后台设置后,后台无法登陆怎么办?
伪静态已经开启,有两个问题希望大神可以回复一下子,跪谢!
开启伪静态就打不开了,请帮忙解决谢谢
wecenter放在二级目录 iis7.0伪静态怎么写?
你好,请教个问题:anwsion2wordpress插件安装
IIS6下安装,www.xxx.com/ask/ 下,首页怎么老是404?没安装静态插件
关于伪静态的一个奇怪的BUG的解决方法