Wordpress .htaccess重定向到同一子文件夹

Wordpress .htaccess重定向到同一子文件夹,wordpress,laravel,.htaccess,subdomain,Wordpress,Laravel,.htaccess,Subdomain,我的问题如下:我的公司与其他公司共享主机,我们的子域位于“public_html”文件夹中。我可以完美地输入我页面的索引,也就是说,它可以完美地输入 问题是当我重定向到我的子域内的页面时,它们重定向到主页的404 Not Found,也就是说principal.com的404 Not Found页面 主/public_html/.htaccess文件为 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRul

我的问题如下:我的公司与其他公司共享主机,我们的子域位于“public_html”文件夹中。我可以完美地输入我页面的索引,也就是说,它可以完美地输入

问题是当我重定向到我的子域内的页面时,它们重定向到主页的404 Not Found,也就是说principal.com的404 Not Found页面

主/public_html/.htaccess文件为

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

您的问题是因为使用了根级别.htaccess中的指令,即使某些内容可能被定向到子文件夹中的站点。在public_html/.htaccess中尝试类似的操作,以排除发送到子文件夹的请求:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_URI} !^/autorizaciones/.*
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

重新启动发动机
重写基/
重写规则^index.php$-[L]
重写cond%{REQUEST_URI}^/Autorizacines/*
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则。index.php[L]
我解决了 我更改了public\u html/mypage/.htaccess文件

<FilesMatch ".(phtml|php|PhP|php5|suspected)$">
Order Allow,Deny
Allow from all
</FilesMatch>
<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /MYPAGE
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>

重新启动发动机
重写基本/我的页面
重写规则^index.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则。index.php[L]

欢迎使用堆栈溢出!只是想澄清一下,几天前一切正常后发生了什么变化?你有更新什么吗?你的提供程序有吗?是的,提供程序删除了旧的.htaccess,并用Wordpress创建了另一个,然后我的子域不起作用。您可以在as principal和www.metalnorsalta.com.ar/autorizaciones/Hello中看到,更改一行,它会以相反的方式工作,子域工作,主页上的链接不工作我更改了:RewriteBase/Autorizations我需要auto_awesome Quisste decir:Necesto que ambos Functionan 28/5000 Resultados de traducción我需要两者都工作是这样的,但是know Not Found在这台服务器上找不到请求的URL/autorizationes/tfc/18109。您好,换一行,它会反过来工作,子域工作,主页上的链接不工作我更改了:RewriteBase/Autorizations我需要auto_awesome Quisste decir:Necesto que ambos Functionan 28/5000 Resultados de traducción我需要两者都工作
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /MYPAGE
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>