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.
精彩评论