简体   繁体   English

子文件夹站点中的Wordpress .Htaccess用法

[英]Wordpress .Htaccess Usage In Subfolder Site

Could someone help me; 有人可以帮我吗? where am i doing wrong? 我在哪里做错了?

My wordpress site is not in root; 我的wordpress网站不是root站点; i installed it in a directory(newsite/) I mean; 我将其安装在目录(newsite /)中; there are 2 sites. 有2个网站。

My root site(example.com) has default htaccess file. 我的根站点(example.com)具有默认的htaccess文件。

And this is my sub wordpress site's(example.com/newsite/) .htacces source: 这是我的子wordpress网站的(example.com/newsite/).htacces来源:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /newsite/
RewriteRule ^newsite/news/hello-world /newsite/news/?title=hello-world [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /newsite/index.php [L]

</IfModule>

# END WordPress

I just want: 我只是想:

www.example.com/newsite/news/hello-world www.example.com/newsite/news/hello-world

(above url should open the url at below; without url change at address bar) (以上网址应在下面打开该网址;地址栏中的网址不得更改)

www.example.com/newsite/news/?title=hello-world www.example.com/newsite/news/?title=hello-world

Check with different permalink options. 检查不同的永久链接选项。 Note : .htaccess file should be writable or paste the suggested code in .htaccess after permalink saved. 注意:永久链接保存后,.htaccess文件应该可写或将建议的代码粘贴到.htaccess中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM