Do MOD_Rewrite Rewrites Invoke A Second Run Through The Rewrite Rules?
When a RewriteRule is executed by MOD_Rewrite will all the MOD_Rewrite rules be executed again for the newly generated request? Specifically in the following example, will this cause a loop?
RewriteCond Host: (?:www\.)?mysite\.com RewriteRule ^(.*)$ $1 [QSA,L]
In your case, it won't at any rate do a loop. You have the "L" switch on, fixing that particular rule as the last one.
Further, you have to explicitly force the next iteration by using the "N" or "NS" switches, or it will just move through your rule file and stop with the last rule that matches. From the docs:
N (Next iteration)
Forces rewriting engine to modify rule's target and restart rules checking from the beginning (all modifications are saved). Number of restarts is limited by the value specified in the RepeatLimit directive. If this number is exceeded N flag will be simply ignored.
NS (Next iteration of the same rule)
Works like the N flag but restarts rules processing from the same rule (i.e. forces repeat of the rule application). Maximum number of a single rule iterations is given by the RepeatLimit directive. But a number of a single rule repeats does not count for the global number of repeats (i.e. repeats limit for a number of iterations caused by N flag is independent of a number of repeats caused by NS).
- → IIS Redirect www to non-www and http to https: is it possible to do it with only one Redirect?
- → How to rewrite the url of a webpage in IIS UrlRewriteModule with web.config?
- → IIS push state thinks all my react routes are static files
- → opening october cms in localhost
- → System.Net.HttpWebException when using IIS SEO Toolkit
- → Image file upload error: Unable to read image from file () - Laravel 5
- → Unable to access wampserver homepage as displaying IIS homepage
- → Copy a Laravel project
- → Converting React app to isomorphic app?
- → Linux shell equivalent on IIS
- → Checklist for IIS 6/ASP.NET Windows Authentication?
- → Bandwith throttling in IIS 6 by IP Address