Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 主页。htaccess重写规则会破坏筛选器_Php_Apache_.htaccess_Mod Rewrite_Url Rewriting - Fatal编程技术网

Php 主页。htaccess重写规则会破坏筛选器

Php 主页。htaccess重写规则会破坏筛选器,php,apache,.htaccess,mod-rewrite,url-rewriting,Php,Apache,.htaccess,Mod Rewrite,Url Rewriting,这可能很简单,但我花了好几天的时间,没有结果 默认情况下,我的网站主页URL为 我想看 当我在.htaccess文件中添加以下规则时: RewriteRule ^()$ index.php?controller=pjLoad&action=pjActionJobs$1 一切正常,但左边的过滤器坏了 以下是我的全部.htaccess内容: #Redirection code starts RewriteEngine On RewriteCond %{HTTPS} off Rewrite

这可能很简单,但我花了好几天的时间,没有结果

默认情况下,我的网站主页URL为

我想看

当我在.htaccess文件中添加以下规则时:

RewriteRule ^()$ index.php?controller=pjLoad&action=pjActionJobs$1
一切正常,但左边的过滤器坏了

以下是我的全部
.htaccess
内容:

#Redirection code starts
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Redirection code Ends

RewriteEngine On
RewriteRule ^(.*)-(\d+).html$ index.php?controller=pjLoad&action=pjActionView&id=$2
RewriteOptions inherit

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

#RewriteRule ^(.*)$ index.php/$1 [PT,L]

RewriteRule ^()$ index.php?controller=pjLoad&action=pjActionJobs$1
</IfModule>
#重定向代码启动
重新启动发动机
重写条件%{HTTPS}关闭
重写规则^(.*)$https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301]
#重定向代码结束
重新启动发动机
重写规则^(.*)-(\d+).html$index.php?控制器=pjLoad&action=pjActionView&id=$2
重写选项继承
重新启动发动机
重写基//
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则//index.php[L]
#重写规则^(.*)$index.php/$1[PT,L]
重写规则^()$index.php?controller=pjLoad&action=pjActionJobs$1

谁能建议一个更好的规则跳过控制器和操作,只查看域吗?

这可能会提供您想要的答案:非常感谢,Bogdan!您的链接帮助我修改了重写规则并获得了所需的行为!没问题。很高兴我能帮忙