开发者

Why is this htaccess running everything twice?

开发者 https://www.devze.com 2023-02-05 15:44 出处:网络
The script (index.php) gets开发者_如何学JAVA called twice every time someone visits /confirm/xyz123

The script (index.php) gets开发者_如何学JAVA called twice every time someone visits /confirm/xyz123

Why?

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [NC,OR] 
RewriteCond %{REQUEST_FILENAME} -d [NC] 
RewriteRule .* - [L]

RewriteRule confirm/([a-zA-Z0-9\_\-]+) /confirm/index.php?hashidemail=$1 [L]


Check that previous response frontloading-mod-rewrite-rule-is-causing-index-php-to-load-twice.

Test that a request via telnet or wget is really making this thing run twice, if not it's an empty GEt somewhere in your previous content.


I figured it out. Turns out it was a problem with IIS Mod-Rewrite.

To fix the problem, I just uninstalled and reinstalled IIS Mod-Rewrite (this time in ASAPI mode, which is an option in the setup process).

Hopefully anyone else who finds themselves with the same problem will find this post.

Cheers.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号