【问题标题】:Wordpress Htaccess problem with subfolder子文件夹的Wordpress Htaccess问题
【发布时间】:2021-12-16 08:11:36
【问题描述】:

我必须使用 WordPress 在站点的子目录中安装程序。

我已经用 WordPress 在其他网站上做过同样的事情,没有任何问题。

我有这个网站的问题,当我转到页面地址时,它显示“页面未找到”。该站点是“www.sogenit.com”,子目录是“ecobonus”。 "www.sogenit.com/ecobonus"

我认为这是一个 .htaccess 问题有人可以帮助我吗? 下面我附上.htaccess文件的内容

文件.htaccess的内容


RewriteEngine On #created by aruba do not touch this file!

#ATTENTION: Remove file index.(php|html|htm)

RewriteBase /

RewriteCond %{REQUEST_URI} !^/drupal/.*$

RewriteRule ^(.*)$ /drupal/$1 [L]

【问题讨论】:

  • 这不是 WordPress .htaccess
  • 您发布的.htaccess 文件在哪里?您是否还有其他 .htaccess 文件,可能在父/根目录中?

标签: wordpress .htaccess


【解决方案1】:

你可以这样使用:

# BEGIN WordPress
RewriteEngine On
RewriteBase /subdirectory-name/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /subdirectory-name/index.php [L]
# END WordPress

【讨论】:

    猜你喜欢
    • 2018-02-26
    • 1970-01-01
    • 2011-11-23
    • 1970-01-01
    • 2014-02-16
    • 2015-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多