我需要用户发送此Url格式:
localhost/application/form.php
重定向并传递'form.php'作为参数:
localhost/application/index.php/site/integration/form.php
要将其他网址格式重定向到:
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>
答案 0 :(得分:0)
在application/.htaccess
内,您可以使用此规则:
RewriteEngine on
RewriteRule ^[\w-]+\.php$ index.php/site/integration/$0 [L,NC]