我不是专家使用.htaccess
我需要在我们的网站abutair.net上发出任何请求,打开第一个WordPress工作区,然后在URL上隐藏子文件夹,例如下面的例子:
相反: https://abutair.net/innerPages/wordpress-4.7.4/wordpress/about-us/
我在网站根文件夹的.htaccess写了以下内容:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?abutair.net$
RewriteCond %{REQUEST_URI} !^/innerPages/wordpress-4.7.4/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /innerPages/wordpress-4.7.4/wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?abutair.net$
RewriteRule ^(/)?$ innerPages/wordpress-4.7.4/wordpress/index.php [L]
</IfModule>
和.htaccess WordPress内部文件夹,如下:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /innerPages/wordpress-4.7.4/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /innerPages/wordpress-4.7.4/wordpress/index.php [L]
</IfModule>
# END WordPress
它成功导向WordPress页面,但子文件夹显示在URL。
请告诉我如何解决这个问题?
提前致谢,