.htaccess htaccess-所有重写都被302重定向
htaccess文件的相关部分包括:.htaccess htaccess-所有重写都被302重定向,.htaccess,mod-rewrite,.htaccess,Mod Rewrite,htaccess文件的相关部分包括: Options +SymLinksIfOwnerMatch -MultiViews RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/?services/([^\.]+)/?$ http://www.domain.com/somefolder/web_services/ins
Options +SymLinksIfOwnerMatch -MultiViews
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?services/([^\.]+)/?$ http://www.domain.com/somefolder/web_services/instructions.php?service=$1 [L,QSA]
直接访问相关页面也会导致URL重定向。我尝试删除所有其他规则来检查双重重定向,但这并没有改变任何事情
有人知道什么会导致每次重写都是302重定向吗?您需要从目标URI中删除
http://
,以避免完全重定向:
Options +SymLinksIfOwnerMatch -MultiViews
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?services/([^.]+)/?$ somefolder/web_services/instructions.php?service=$1 [L,QSA,NC]
Lol认为这可能与此有关,但想不出任何原因:P非常感谢,先生!