与字preSS除非使用URL重写不工作[R] [英] Url rewriting not working with wordpress unless using [R]

查看:270
本文介绍了与字preSS除非使用URL重写不工作[R]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上的文件夹就一个字preSS安装博客-ITA / 。现在,我想补充重写规则,以允许从访问该网站的名称/博客/

I have a Wordpress installation on my website on the folder blog-ita/. Now, I'd like to add a rewrite rule to allow accessing it from website-name/blog/.

我用这个重写规则:

RewriteRule ^website-name/blog/(.*)$ blog-ita/$1

现在,这个工作如果我添加了[R]标记,但除此之外,我从文字preSS 404找不到页面,而不是页面我想看到的。

Now, this works if I add the [R] tag, but otherwise I get the 404 not found page from wordpress instead of the page I wanted to see.

怎么会是这样?我怎样才能使这项工作没有 [R] 标志?

How can that be? How can I make this work without the [R] flag?

推荐答案

您可以遵循的从Word preSS本指南获得话语preSS在万字preSS实际上是位于不同的目录中工作。

You can follow this guide from Wordpress to get Wordpress to work in a different directory than wordpress is actually located.

您想安装字preSS在博客-ITA 目录。您希望URL显示网​​站名称/博客代替。请按照下列步骤:

You want to install wordpress in the blog-ita directory. You want the url to show website-name/blog instead. Follow the following steps:

  1. 进入常规面板中的管理部分,然后更改/检查以下框,然后保存更改:
    • 在网站的地址(URL):将其更改为 http://example.com/website-name/blog
    • 确保这个词preSS地址是否正确设置为 HTTTP://example.com/blog-ita
  1. Go to the "General" panel in your admin section and change/check the following boxes, then save the changes:
    • Site address (URL): Change this to http://example.com/website-name/blog
    • Make sure that WordPress address is correctly configured as htttp://example.com/blog-ita.

从这个角度上,字preSS应该可以在 http://example.com/website-name/blog/ 。管理部分只适用于实际的安装目录( /博客-ITA /管理员)。

From this point on, wordpress should be available at http://example.com/website-name/blog/. The admin section is only available at the actual installation directory (/blog-ita/admin).

这篇关于与字preSS除非使用URL重写不工作[R]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆