cache-clear
environment variable. This will cause cache cleaning corresponding to the current request (context).
Setting cache-clear
variable using SetEnvIf directive provides flexibility of conditions that will lead to cache cleaning.
For example, to trigger cache cleaning by requesting specific URL:
SetEnvIf request_uri ^/system/cache/clear/$ cache-clear=1
To trigger cache cleaning by appending specific query string value:
SetEnvIf Query_String clear_cache_request cache-clear=1
For security purposes it may be necessary to clean cache only from definite IP address:
SetEnvIf (Query_String clear_cache_request) and (Remote_Addr 11\.22\.33\.44) cache-clear=1
Cache cleaning may take some time, so be ready.
When cache cleaning is over, the error.log
(with info or higher verbosity level) will display the number of deleted records.
Best regards,
Ruslan, Anton – Helicon Tech Team
<location path="Example.com">
<system.webServer>
<handlers accessPolicy="Read, Script">
<clear />
<add name="Plesk_Handler_05171048" path="*.dll" verb="*"
modules="IsapiModule" resourceType="File"
requireAccess="Execute" allowPathInfo="true" />
<add name="Plesk_Handler_05171080" path="*.exe" verb="*"
modules="CgiModule" resourceType="File"
requireAccess="Execute" allowPathInfo="true" />
<add name="StaticFile" path="*" verb="*"
modules="StaticFileModule,DefaultDocumentModule,
DirectoryListingModule" resourceType="Either" />
</handlers>
...
</location>
To add handler for Helicon Ape, you need to add this simple spell to the root web.config for the site:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="Helicon.Ape Handler" path="*.apehandler" verb="*"
type="Helicon.Ape.Handler" resourceType="Unspecified"
preCondition="integratedMode" />
</handlers>
</system.webServer>
</configuration>
Guess, this small hint will make Plesk and Ape cohabitation on your server more peaceful.
Best regards,
Sergey, Anton – Helicon Tech Team
The same problem occured with Helicon Ape while installing on Windows Server 2003, IIS6. User had full control of config files and was able to browse the sites in IIS, but not a single rule took effect.
Investigation of the problem led us to IIS Manager/Web Service Extensions. The ASP.NET handler was disabled, which was completely blocking Helicon Ape operation.
The reason is that Ape is an ASP.NET module which can’t be run with appropriate handler “prohibited”.
One look is all it takes to find a solution to the issue – press “Allow” button for ASP.NET in Web Service Extensions:
Best regards,
Andrew & Anton, Helicon Tech Team
So, after fresh install of IIS7 you are likely to notice that requests containing plus (‘+’) character are not accepted.
The issue is that by default IIS is set to not accept double escape sequences. Let’s fix it.
Open IIS Manager, go to Request Filtering page and open Edit feature settings… dialog.
Now check the Allow double escaping option and press OK.
Note! The same can be set directly in web.config using the following code:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
</system.webServer>
</configuration>
That done, refresh the page in the browser and you’ll have it handled correctly.
Hope you’ll find this tip helpful.
Best regards,
Anton, Helicon Tech Team
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<remove name="AboMapperCustom-xxxxxxxx" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfm" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfc" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfml" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfr" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
<add name="AboMapperCustom-xxxxxxxx" path="*.cfswf" verb="*" modules="IsapiModule"
scriptProcessor="C:\ColdFusion8\runtime\lib\wsconfig\1\jrun_iis6_wildcard.dll"
resourceType="Unspecified" requireAccess="Script" responseBufferLimit="0" />
</handlers>
</system.webServer>
</configuration>
Regards,
Anton, Helicon Tech Team
So, the conditions were:
Solution
To accomplish the above task with the least effort, we need the following.
Mapfiles:
london-map.txt:
london_seo_value1 11
london_seo_value2 22
london_seo_value3 33
etc.
paris-map.txt:
paris_seo_value1 44
paris_seo_value2 55
paris_seo_value3 66
etc.
moscow-map.txt:
moscow_seo_value1 77
moscow_seo_value2 88
moscow_seo_value3 99
etc.
Config:
RewriteBase /
RewriteMap london-map txt:london-map.txt [NC]
RewriteMap paris-map paris-map.txt [NC]
RewriteMap moscow-map moscow-map.txt [NC]
#etc.
RewriteCond %{HTTP_HOST} ^(?!www\.)([^.]+)\.domain\.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond ${%1-map:$1|NOT_FOUND} !NOT_FOUND
RewriteRule ^([^/]+)/?$ city.asp?city=%1&id=${%1-map:$1} [NC,L]
The idea is that the first part of mapfile name is dynamic and depends on the name of the subdomain being requested.
Now upon request to http://paris.domain.com/paris_seo_value1 you’ll be shown the content of http://www.domain.com/city.asp?city=paris&id=44. And upon request to http://moscow.domain.com/moscow_seo_value3 you’ll be shown the content of http://www.domain.com/city.asp?city=moscow&id=99.
Resume
As you can see we have just one rule (instead of 300) which cares about all possible requests and deals with all existing mapfiles.
We have decided to start a series of little titbits about our software. You may find them interesting
and helpful.
Today we’re gonna explain you what the “double registration” term means. It’s a typical situation on our support when a user can’t get ISAPI_Rewrite working while everything seems great, NTFS permissions are OK, the rules are the simplest ever but still no go.
In these cases we commonly ask the user to provide their IIS metabase.
On Windows 2003 Server you may find it here: C:\windows\system32\inetsrv\metabase.xml.
Windows 2008 provides another configuration model and we ask for C:\windows\system32\inetsrv\config\applicationHost.config.
Generally, double registration means simultaneous registration of ISAPI_Rewrite.dll on two different levels. “Web Sites” tree node is what we call “global level”. If you have ISAPI_Rewrite registered here, you will have the tool working for every web-site on your server. Saying “local level” we imply particular web-site.
So the point is you must have only one type of the registration — either on the global level, or on one or several local levels (to enable ISAPI_Rewrite for one or several sites respectively).
Within IIS metabase a double registration issue looks as follows:
<IIsFilter Location ="/LM/W3SVC/1800802984/filters/ISAPI_REWRITE"
FilterPath="C:\Program Files\Helicon\ISAPI_Rewrite3\ISAPI_Rewrite.dll"
>
</IIsFilter>
<IIsFilters Location ="/LM/W3SVC/Filters"
AdminACL="4963....342d"
FilterLoadOrder="ASP.NET_2.0.50727.0,ISAPI_Rewrite3"
>
</IIsFilters>
If you selected automatic installation of ISAPI_Rewrite you would have the tool registered globally. Here is an example:
The next screenshot demonstrates correct local registration, which you can’t get from the installation wizard, but should perform manually:
This is it. We’ve described the very gist of double registration and hope you won’t have such misconfiguration on your system.
Yours sincerely,
Helicon Tech team.