Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/18.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.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
Regex 重新写入规则时出错_Regex_Apache_.htaccess_Codeigniter_Mod Rewrite - Fatal编程技术网

Regex 重新写入规则时出错

Regex 重新写入规则时出错,regex,apache,.htaccess,codeigniter,mod-rewrite,Regex,Apache,.htaccess,Codeigniter,Mod Rewrite,我正在使用一个学习视频中的重写规则 但它不能正常工作 Options +FollowSymLinks Options -Indexes DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$

我正在使用一个学习视频中的重写规则

但它不能正常工作

Options +FollowSymLinks
Options -Indexes

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
如果只是输入,我想把它取起来

但它只有在我输入的时候才起作用

目前只显示“未指定输入文件”我使用codeigniter和cpanel我已经尝试了下面的两个答案,但仍然没有运气我的站点使用https使用此代码
Use this code
 <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /www.example.com
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>  
重新启动发动机 RewriteBase/www.example.com 重写cond%{REQUEST_FILENAME}-F 重写cond%{REQUEST_FILENAME}-D 重写规则^(.*)$index.php/$1[L] ErrorDocument 404/index.php
使用此代码
重新启动发动机
RewriteBase/www.example.com
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php/$1[L]
ErrorDocument 404/index.php

尝试用以下内容替换规则:

Options +FollowSymLinks -Indexes -MultiViews

DirectoryIndex index.php

RewriteEngine on

RewriteCond %{REQUEST_URI} !^/(index\.php|images/|robots\.txt) [NC]
RewriteRule ^ index.php%{REQUEST_URI} [L] 

尝试用以下内容替换您的规则:

Options +FollowSymLinks -Indexes -MultiViews

DirectoryIndex index.php

RewriteEngine on

RewriteCond %{REQUEST_URI} !^/(index\.php|images/|robots\.txt) [NC]
RewriteRule ^ index.php%{REQUEST_URI} [L] 

在将example.com更改为我的域后仍然不起作用我有mysql和apacheStill在将example.com更改为我的域后仍然不起作用我有mysql和apacheI开始工作了我使用了另一个,现在还可以使用https,我使用了另一个,现在还可以使用https后面是什么