• 欢迎 游客 您的光临,下载之前请先阅读 积分规则 。任何技术问题请在论坛提问,本站定制插件、模板主题。售前、售后问题请联系QQ:5916171
    本站自由发布资源可赚取积分及人民币(可提现)(保证资源真实可用,如被举报封号处理。谨慎分布)。
  • 即日起发表主题、回帖、发布&更新资源、创建&回复私信、发布&回复个人动态均需要验证手机号码,其它不受影响。如不便可进群提问。点击链接加入群聊【XenForo讨论社区】:群号1:143277648

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

死了算了

管理成员
UID
1
注册
2017/07/28
消息
1,721
解决方案
130
黄金
214,912G
@刺-客
可以用了,注意路径....
代码:
扩展 折叠 复制
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如果能访问除版面列表之外的页面,则表示设置成功
 
最后编辑:
回头再研究一下……搞不懂
这是服务商给的信息 您好,这里查看您的环境使用的是apache的环境,您使用的是httpd.conf配置文件,路径是/www/server/apache/conf ,您的include包含的文件路径是/www/server/apache/conf ,看怎么样才能取消那东西
 
貌似apache环境的 直接修改网站根目录下的 htaccess.txt 为.htaccess就可以了吧,没有弄过apache的
这是服务商给的信息 您好,这里查看您的环境使用的是apache的环境,您使用的是httpd.conf配置文件,路径是/www/server/apache/conf ,您的include包含的文件路径是/www/server/apache/conf ,看怎么样才能取消那东西
 
浏览附件69

这里的#去掉 路径正确不?
内容复制替换好后将代码中的:#RewriteBase /xenforo 这段代码的#去掉然后保存!请注意此代码RewriteBase /xenforo如果存在空格请删除空格就像这样才行:RewriteBase/xenforo 否则其他页面可能404!
 
用了楼主的不管用,本人使用宝塔环境,正确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;
}
 
用了楼主的不管用,本人使用宝塔环境,正确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路径删除即可
 
后退
顶部 底部