【问题标题】:.htaccess hide subfolder url in wordpress.htaccess 在 wordpress 中隐藏子文件夹 url
【发布时间】:2016-11-21 18:54:09
【问题描述】:

我有一个带有 URL 的 WordPress 网站: http://thelaptopsolutions.in/Laptop%20Solution/

这工作正常,但 URL 现在显示 http://thelaptopsolutions.in/Laptop%20Solution/ 但我希望它显示 http://thelaptopsolutions.in

这是我当前的 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

提前谢谢..

【问题讨论】:

  • 您的.htaccess 文件在哪里? Laptop%20Solution 是安装 WordPress 的物理子目录吗? (在这种情况下,我假设您的 .htaccess 文件也在此子目录中?)

标签: php wordpress .htaccess url-rewriting url-redirection


【解决方案1】:

我建议您不要弄乱 .htaccess 文件的内容。恢复您对此文件所做的更改并按照简单的程序进行操作。

  1. 登录到管理仪表板。
  2. 转到设置 > 常规
  3. 在 WordPress 地址 (URL) 字段中输入 http://www.example.com/site
  4. 在站点地址 (URL) 字段中键入 http://www.example.com

保存更改,您应该一切顺利。

【讨论】:

    猜你喜欢
    • 2014-01-25
    • 2020-01-13
    • 2015-07-19
    • 1970-01-01
    • 2013-01-24
    • 2015-04-09
    • 1970-01-01
    • 1970-01-01
    • 2021-12-22
    相关资源
    最近更新 更多