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

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

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 人关注

推荐内容

IIS7.5的伪静态到底怎么搞?
求帮忙设置伪静态,有偿!!!求大神支招啊!!!
网页开启伪静态后就打不开了 伪静态生成后是放在那个文件夹下面的路径是?希望高手帮忙解决一下好吗?
IIS伪静态
伪静态后活动页面打不开
为什么文章缩略图显示不出来,显示的是数字
https + 伪静态 + LNMP 一件安装包 QQ 互联 redirect uri is illegal(100010) 错误
万网空间如何实现伪静态,求大神指导
IIS6伪静态成功,其它页面都能正常访问,就是发现页的"推荐"热门"等待回复"访问不了
希望增加伪静态路径功能