WordPress .htaccess文件阻止访问WHMCS Admin

时间:2021-05-11 13:25:53

I have a WordPress website that is using a WHMCS Bridge to integrate to WHMCS. It all works fine when the Permalinks are set to default. As soon as set them to Post Name - the .htaccess file changes and I can no longer access the WHMCS admin. The Client area and everything else works fine, but this throws a 404.

我有一个WordPress网站正在使用WHMCS Bridge来集成到WHMCS。当永久链接设置为默认值时,一切正常。只要将它们设置为Post Name,.htaccess文件就会更改,我无法再访问WHMCS admin。客户端区域和其他一切正常,但这会引发404。

Does anyone have any ideas why?

有没有人有任何想法?

WordPress is in /public_html/

WordPress位于/ public_html /

WHMCS is in /public_html/billing/

WHMCS位于/ public_html / billing /

WHMCS Admin is /public_html/billing/admin

WHMCS Admin是/ public_html / billing / admin

.htaccess file has the default content:

.htaccess文件具有默认内容:

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

# END WordPress

1 个解决方案

#1


Just a guess, I'm not an .htaccess guru. Do you have a menu item in Wordpress with a permalink of 'billing'? If so, I would imagine the permalink is mapping not to WHMCS but instead to that mapped menu item. Then when going to /billing/admin it doesn't exist in Wordpress so it is throwing a 404.

只是一个猜测,我不是一个.htaccess大师。你在Wordpress中有一个菜单项,其永久链接是“结算”吗?如果是这样,我会想象永久链接不是映射到WHMCS而是映射到该映射菜单项。然后,当进入/ billing / admin时,它在Wordpress中不存在,因此它会抛出404。

So if /billing in Wordpress is a redirect to your /billing/clientarea.php file for example, that would work, but going to /billing/admin won't because Wordpress doesn't have a corresponding sub menu item called admin.

因此,如果Wordpress中的/ billing是重定向到您的/billing/clientarea.php文件,例如,这将有效,但转到/ billing / admin将不会,因为Wordpress没有相应的子菜单项称为admin。

That's just a guess though... hope that is of help.

这只是一个猜测...希望这是有帮助的。

#1


Just a guess, I'm not an .htaccess guru. Do you have a menu item in Wordpress with a permalink of 'billing'? If so, I would imagine the permalink is mapping not to WHMCS but instead to that mapped menu item. Then when going to /billing/admin it doesn't exist in Wordpress so it is throwing a 404.

只是一个猜测,我不是一个.htaccess大师。你在Wordpress中有一个菜单项,其永久链接是“结算”吗?如果是这样,我会想象永久链接不是映射到WHMCS而是映射到该映射菜单项。然后,当进入/ billing / admin时,它在Wordpress中不存在,因此它会抛出404。

So if /billing in Wordpress is a redirect to your /billing/clientarea.php file for example, that would work, but going to /billing/admin won't because Wordpress doesn't have a corresponding sub menu item called admin.

因此,如果Wordpress中的/ billing是重定向到您的/billing/clientarea.php文件,例如,这将有效,但转到/ billing / admin将不会,因为Wordpress没有相应的子菜单项称为admin。

That's just a guess though... hope that is of help.

这只是一个猜测...希望这是有帮助的。