繁体   English   中英

为什么我干净的 url 不能在另一个文件夹中工作?

[英]Why does my clean url not work inside another folder?

我正在尝试为 SEO 获取干净的 URL。 我以前从来没有这样做过,我得到它为我的页面文件夹中的简单文件工作。

但是我的页面文件夹中有另一个文件夹,称为文件夹 b

我凌乱的 URL(在页面文件夹内): index.php?page=

来自文件夹 b 的凌乱 URL:index.php?page=folderb/file

我从页面文件夹中得到了一个干净的 URL。 但是从我在文件夹 b 中的页面中,我无法正常工作。

我已经尝试将其他 .htaccess 文件添加到我的文件夹 b 文件夹并覆盖根 .htaccess

我试图在我的导航栏中使用域名/文件夹/名称文件。

我尝试过的所有东西都得到了 404 页面

我的 .htaccess 文件

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ index.php?page=$1 [L,QSA]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php\?page=([^\s]+) [NC]
RewriteRule ^ %1? [R=301,L]

我希望从我的页面文件夹中的文件夹 b 中获得一个干净的 url。

好的,所以我又试了一次,但情况更糟,我收到了此错误消息

Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please.

看来我不能回头了。 如果我切换到我的旧.htaccess并更改我的 header.ZE13BFD7623EECEZ8409 中的 URL 则不会

我的其他页面正在运行,但domainName/home/Server/https/fastcgi/rid/54/26/59315426/htdocs/folderB/file中的所有页面

暂无
暂无

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

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