• 欢迎 游客 您的光临,下载之前请先阅读 积分规则(暂行) 。任何技术问题请在论坛提问,本站定制插件、模板主题。售前、售后问题请联系QQ:5916171
  • 发帖需要扣除两点虚拟积分是为了控制乱发广告,如不便可进群提问。点击链接加入群聊【XenForo讨论社区】:群号1:143277648

技巧教程 xenforo 2 1.5 friendly URLs 伪静态

死了算了

管理成员
UID
1
注册
2017/07/28
消息
1,568
解决方案
117
黄金
151,835G
@刺-客
可以用了,注意路径....
代码:
location /xf/ {
try_files $uri $uri/ /xf/index.php?$uri&$args;
index index.php index.html;
}

location /xf/install/data/ {
internal;
}
location /xf/install/templates/ {
internal;
}
location /xf/internal_data/ {
internal;
}
location /xf/library/ {
internal;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass    127.0.0.1:9000;
fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
include         fastcgi_params;
}


设置好后,打开后台的 最佳url如果能访问除版面列表之外的页面,则表示设置成功
 
最后编辑:
UID
5
注册
2017/09/09
消息
33
黄金
6,935G
回头再研究一下……搞不懂
这是服务商给的信息 您好,这里查看您的环境使用的是apache的环境,您使用的是httpd.conf配置文件,路径是/www/server/apache/conf ,您的include包含的文件路径是/www/server/apache/conf ,看怎么样才能取消那东西
 

死了算了

管理成员
UID
1
注册
2017/07/28
消息
1,568
解决方案
117
黄金
151,835G
貌似apache环境的 直接修改网站根目录下的 htaccess.txt 为.htaccess就可以了吧,没有弄过apache的
这是服务商给的信息 您好,这里查看您的环境使用的是apache的环境,您使用的是httpd.conf配置文件,路径是/www/server/apache/conf ,您的include包含的文件路径是/www/server/apache/conf ,看怎么样才能取消那东西
 
UID
184
注册
2018/09/28
消息
5
黄金
226G
浏览附件69

这里的#去掉 路径正确不?
内容复制替换好后将代码中的:#RewriteBase /xenforo 这段代码的#去掉然后保存!请注意此代码RewriteBase /xenforo如果存在空格请删除空格就像这样才行:RewriteBase/xenforo 否则其他页面可能404!
 
UID
34
注册
2017/11/12
消息
9
黄金
4G
用了楼主的不管用,本人使用宝塔环境,正确nginx伪静态是
代码:
location /xf/ {
    try_files $uri $uri/ /xf/index.php?$uri&$args;
    index index.php index.html;
}

location /xf/internal_data/ {
    internal;
}
location /xf/library/ {
      internal;
}
location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi_params;
}
 
UID
34
注册
2017/11/12
消息
9
黄金
4G
用了楼主的不管用,本人使用宝塔环境,正确nginx伪静态是
代码:
location /xf/ {
    try_files $uri $uri/ /xf/index.php?$uri&$args;
    index index.php index.html;
}

location /xf/internal_data/ {
    internal;
}
location /xf/library/ {
      internal;
}
location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass    127.0.0.1:9000;
    fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi_params;
}
如果不管用 吧xf路径删除即可
 
顶部 底部