Regex Htaccess:RewriteCond不适用于多个条件
我需要用户何时发送此Url格式:Regex Htaccess:RewriteCond不适用于多个条件,regex,.htaccess,Regex,.htaccess,我需要用户何时发送此Url格式: localhost/application/form.php 要重定向“form.php”并将其作为参数直接传递给: localhost/application/index.php/site/integration/form.php 对于要重定向到的其他URL格式: localhost/application/index.php 我抛出此代码,但不起作用: <IfModule mod_rewrite.c> RewriteEngine on R
localhost/application/form.php
要重定向“form.php”并将其作为参数直接传递给:
localhost/application/index.php/site/integration/form.php
对于要重定向到的其他URL格式:
localhost/application/index.php
我抛出此代码,但不起作用:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*.php
RewriteRule .*.php index.php/site/integracao - [L]
RewriteBase /
RewriteRule . index.php - [L]
</IfModule>
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写条件%{REQUEST_URI}!。*。php
重写规则。*.php index.php/site/integracao-[L]
重写基/
重写规则。index.php-[L]
内部应用程序/.htaccess
您可以使用以下规则:
RewriteEngine on
RewriteRule ^[\w-]+\.php$ index.php/site/integration/$0 [L,NC]
此.htaccess是否位于
application/
文件夹中?是的.htaccess位于application/folder中如果您想知道其他方法,请告诉我