Vinay Jeurkar
Vinay Jeurkar

Reputation: 3122

how to turn off .HTACCESS rewrite engine off for a file

i have rewrite engine on with a rule to attach www in every url being accessed on my website. the rule is written in htaccess located in public_html folder. now a problem is i have registered a web application in windows live developer website. as you may know, the windows like applications doesn't accept/allow domains to be verified as www.mydomain.com. they only accept mydomain.com format. so the return url specified in application settings is not delivering data as my verified domain is "mydomain.com" and in return url "www" is being attached due to htaccess rule. so i would like to know if there is any way i can exclude my 1 specific file (not the folder) from all rewrite rules being applied. or is there any way i can verify my domain as www.mydomain.com in windows live applications? also, is there any way to turn off rewrite rules off for that particular file from PHP?

Upvotes: 1

Views: 3685

Answers (1)

anubhava
anubhava

Reputation: 785256

In your .htaccess rule you can add a condition like this:

RewriteCond %{SCRIPT_FILENAME} !.*myFile.asp$ [NC]

to execute your rewrite rules for everything EXCEPT a file called myFile.asp.

Upvotes: 2

Related Questions