与字preSS除非使用URL重写不工作[R] [英] Url rewriting not working with wordpress unless using [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:
- 进入常规面板中的管理部分,然后更改/检查以下框,然后保存更改:
- 在网站的地址(URL):将其更改为
http://example.com/website-name/blog
- 确保这个词preSS地址是否正确设置为
HTTTP://example.com/blog-ita code>
- 在网站的地址(URL):将其更改为
- 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
.
- Site address (URL): Change this to
从这个角度上,字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屋!