I'm using Helicon's ISAPI Rewrite 3, which basically enables .htaccess in IIS. I need to redirect a non-www URL to the www version, i.e. example.com should redirect to www.example.com. I used the following rule from the examples but it affects subdomains:
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP:Host} ^(?!www\.)(.+)$ [NC]
Rewrite...
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]
...
I've been using ISAPI_Rewrite from Helicon (http://www.helicontech.com/isapi_rewrite/) on a Server 2003 box for years and have always had good luck with it.
I'm migrating all the sites on the 2003 box to a new shiny Server 2008 box. I would prefer to not purchase a new license and I have heard that IIS 7 will have capability built in.
...
Hi, I have:
http://www.one.com
and
http://www.one.com/uk
www.one.com is the main site, but there is a UK version of this site which ideally needs to be in a subdirectory (/uk).
How do set IIS up to allow me to have multiple sites under one domain?
Or can I have two separate sites and use ISAPI_rewrite to point www.one.com/uk to r...
I've been asked to help out with some ColdFusion development and one of the tasks will be to undertake url re-writing, mostly turning url parameters into a cleaner url.
The site is on a hosted service with cf8 running on iis, with Helicon Tech ISAPI_Rewrite v2.
Are there any things I should look out for?
Thanks.
...
I am trying to exclude a directory with ISAPI-Rewrite (note: this is a windows/iis port of mod-rewrite).
The directory I want to exclude is "api" when it is at the root of the site.
Here is my rule:
RewriteRule ^(/api/)(.+)$ $1$2 [NC, L]
A request would look something like this:
/api/v2/users?usernames=scottw
Unfortunately, the quer...
Hi,
I'm trying to use IIS Isapi Rewrite to do the following...
I need seo-friendly URLs to be (silently) converted back to application friendly URLs like so:
RewriteRule ^/seo-friendly-url/ /test/index.cfm [I,L]
Simple enough.
But I also need URLs already indexed in search engines (for example) to be 301 redirected to the seo-frien...
Hi,
A little late but I just upgraded from Isapi Rewrite version 2 to version 3.
I'm having problems with rules in the following style:
RewriteRule ^/seo-friendly/(\?(.*))? /test/index.cfm?page=home&$2
Here I want any extra query string parameters passed on to the rewritten URL.
This worked fine under IR2 but fails to pass the extr...
Hi,
I'm using Isapi Rewrite 3 (mod rewrite clone for IIS) and trying to rewrite URLs based on the query string - and then pass on part of that query string in the rewrite.
So if I enter a URL like this: /test/home.cfm?page=default&arbitraryExtraArg=123
I want that to be rewritten as: /test/index.cfm?page=home&arbitraryExtraArg=123
I ...
Hi, I need to grab some of my website's old URLs and do a 301 redirect to the new ones, since they are already indexed and we don't want to loose relevance after the change. The old URL is in fact very ugly and for some reason everything I try to do to rewrite it does not work. Here it is:
http://www.mywebsite.com/ExibeCurso.asp?Comando...
I'm moving my blog which was in a physical folder (/blog/) on my IIS 6 web server to a virtual directory called the same name (blog) running BlogEngine.net, the virtual directory is running in the same application pool as the parent website.
I want to redirect each .html post to the new BlogEngine.net URL. e.g.
http://www.mywebsite...
Hi,
I'm running a site which has 2 separate sub-domains - one for HTTP and another for HTTPS.
http://www.example.com
https://secure.example.com
http://secure.example.com does not exist and will not resolve.
The problem is that the site is running behind a load balancer which handles all SSL. Communication between the load balancer ...
I have a site that serves up certain content based on the subdomain. So it is the same set of files, and maybe the header and some info in the site pages changes based on the subdomain.
I need to have different htpassword authentication based on the subdomain as well, but can't find info on how to do an if/then type of thing in htacces...
I need to write an ISAPI filter for IIS 6.0 to rewrite ugly URLs into SEO-friendly URLs. Because of the need for string parsing and regular expressions, I'd prefer to use Perl to do this. There is a module for IIS called (ingeniously) Perl for IIS, but I'd rather not use that because it's an ISAPI extension itself (running in a DLL), so ...
Hello,
I want to implement the mapping issue of this tool and I cannot make it work. This is the rule:
RewriteBase /
RewriteMap mapfile txt:mapfile.txt
RewriteRule /([^?/]+)\.asp /Products.asp?Prod=${mapfile:$1}
For example, I want every file on my website which is in this format: /products.asp?prod=2
replaced with /LAW
or at l...
First look at this url:
http://stackoverflow.com/questions/tagged/xoxoxo/
This directory does not exists but somehow stackoverflow can pass that last directory as a parameter to his base script.
Is this possible to configure IIS or Apache to do so? How?
...
I'm using IIS6 (unfortunatly) and have built an ASP.Net MVC app; IIS is set up for wildcards to make the routing work but I have two virtual directories that contain wordpress installations which works fine.
I have two .htaccess files (one in each wp install) that handles their rewriting fine, but I want to setup a rewrite from /about t...
I just recently migrated from a linux host to a dedicated server with windows 2003, I had only one site using Mod_rewrite, but with ISAPI _Rewrite 3 free, the rules are global.
How do I write a condition to affect only "mysite.com" and not the others?
this is my httpd.conf file
# Helicon ISAPI_Rewrite configuration file
# Version 3.1....
We recently reinstalled our web site on our server, the sys admin says it is an exact rebuild, and it indeed looks to me that it is, but there is something different going on. I did not originally develop the site, and those who did are no longer available.
urls for the admin site are now
//admin.site.com/index.php/schedules
and used...
In ISAPI_rewrite 3 documentation is this example
RewriteRule ^(.*?\.asp)/([^/]*)/([^/]*)(/.+)? $1$4?$2=$3 [NC,LP,QSA]
http://www.myhost.com/foo.asp/a/A/b/B/c/C
http://www.mysite.com/foo.asp?a=A&b=B&c=C
Since my products can have more or less parameters in query string, this seemed like right approach.
Based on given example I...