简体   繁体   English

.htaccess在wordpress中隐藏子文件夹url

[英].htaccess hide subfolder url in wordpress

I've WordPress site with the URL : http://thelaptopsolutions.in/Laptop%20Solution/ 我的WordPress网站的网址为: http : //thelaptopsolutions.in/Laptop%20Solution/

This is working fine but the URL now shows http://thelaptopsolutions.in/Laptop%20Solution/ but I want it to show http://thelaptopsolutions.in 这工作正常,但URL现在显示http://thelaptopsolutions.in/Laptop%20Solution/但我希望它显示http://thelaptopsolutions.in

Here's my current htaccess code 这是我当前的htaccess代码

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /Laptop%20Solution/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /Laptop%20Solution/index.php [L]
</IfModule>

# END WordPress

Thanks in advance.. 提前致谢..

I advice you against messing up the contents of the .htaccess file. 我建议您不要弄乱.htaccess文件的内容。 Revert the changes that you've made to this file and follow the simple procedue. 恢复对该文件所做的更改,并遵循简单的过程。

  1. Login to the admin dashboard. 登录到管理控制台。
  2. Go to Settings > General 转到设置>常规
  3. In the WordPress Address (URL) field type http://www.example.com/site 在WordPress地址(URL)字段中,输入http://www.example.com/site
  4. In the Site Address (URL) field type http://www.example.com 在“站点地址(URL)”字段中,输入http://www.example.com

Save the changes and you should be good to go. 保存更改,您应该一切顺利。

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

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