url-rewriting

Simple Hackable URL implementation for ASP.NET (3.5)

I'm looking for a good sample project, or web site reference, which gives a simple easy to understand overview of URL Rewriting and making Hackable URLs. I've read a good amount about the concept, but I'm specifically looking for a good implementation example for a programmer to use to get started. This is specifically for .NET 3.5, so...

Server.Transfer vs. Context.RewritePath

I understand they both don't change the URL that the client sees. Is there anything in them that makes one of them preferable over the other? I'm planning to use it in the Application_BeginRequest in Global.asax, but also in regular aspx page. ...

IIS Log Files showing Rewritten rather than Original Url

I've got a problem in that changing the way I'm doing Url Rewriting in an Asp.Net application has changed the IIS log files from looking like this: /page/ 80 etc.. /page/anotherpage/ 80 etc... to default.aspx page=1 80 etc... default.aspx page=2 80 etc... I'm a bit stumped as to how this happened. Is there a setting I'm missing (Win...

IIS7, RewritePath and IIS log files

Hi, I am using Context.RewritePath() in ASP.NET 3.5 application running on IIS7. I am doing it in application BeginRequest event and everything works file. Requests for /sports are correctly rewritten to default.aspx?id=1, and so on. The problem is that in my IIS log I see GET requests for /Default.aspx?id=1 and not for /sports. Thi...

How can I use the URL to set the current culture in ASP.NET 2.0 Web App?

Hi, I am looking in to ways to enable a site to basically have something like: http://mysite.com/en-US/index.aspx` Where the "en-US" can vary by culture.. This culture in the URL will then basically set the CurrentUICulture for the application.. Basically, we currently have a page where the user explicitly clicks it, but some are fa...

How can I extract data and replace it with new code and save that as a new text?

Hi, I have been trying to extract last six numbers of an URL in each line of the original text and add it to another code that must be added to the result text. There also need to remove some code of each line from the original text and replace it with new code in the result text. input http://riyajr.googlepages.com/original.txt outpu...

.htaccess Rewrite Rules for subdomain

I use codeigniter as my main install on the main domain. I have created a subdomain and a folder called live e.g. live.domain.com maps to public/live . However in public I use codeigniter. I now have the dynamic codeigniter url: http://domain.com/api/ which I want to map to my subdomain: https://live.domain.com So going to: https...

asp.net client/browser url

I'm wondering how I can get the url from the browser in asp.net. I have a page that I use globalization/localization for and I am redirecting (via server not code) from www.spanishversion.com to www.englishversion.com but the url is masked to still say www.spanishversion.com. I want to get what the browser's url is but when I try thing...

ASP.Net 1.1 with Wildcard Mapping gives 404 on default documents.

I have an application where it was requested that a friendly url be made for a dynamic page that uses a lot of query string values. After some research on the Internet, I found that I needed to create either an HttpModule or HttpHandler to do the routing and then setup a wildcard mapping to the .Net v1.1 of aspnet_isapi.dll in IIS (remo...

URL Rewrite on IIS7 for Wordpress

I am using shared hosting with IIS7 and support for PHP. I am trying to run a wordpress blog with "pretty urls" (removing index.php). The hosting provider doesn't want to install the URLRewrite module, so that option isn't available to me. I found a plugin for wordpress that will remove the index.php from permalink URLs and changing the ...

Using a custom URL rewriter, IIS6, and urls with .htm, .html, etc

I have a custom site I'm building with automatic url rewriting using a custom engine. The rewriting works fine as long as the page url doesn't end in somehting like .htm or .html. For these pages it goes directly to the iis 404 page instead of hitting my rewriting engine first. I have the * wildcard handler in the "Home Directory" sec...

.htaccess URL is being cut at a space (I'm using Codeigniter)

I've used the following code to map https://live.example.com on to http://example.com/api Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTPS} =on RewriteCond %{HTTP_HOST} ^live\.example\.com [NC] RewriteRule (.+)$ "http://example.com/api/$1" [L,P] The following url: https://live.example.com/userlinks/xml/John%20James/MvP...

Postback problem when using URL Rewrite and 404.aspx

I'm using URL rewrite on my site to get URLs like: http://mysite.com/users/john instead of http://mysite.com/index.aspx?user=john To achive this extensionless rewrite with IIS6 and no access to the hosting-server I use the "404-approach". When a request that the server can't find, the mapped 404-page is executed, since this is a aspx-pa...

URL Rewriting under IIS at GoDaddy

I'm trying to get URL rewriting to work under IIS 7 at GoDaddy. I have wordpress installed and would like to use the "pretty" permalinks. After searching I found a few articles at learn.iis.net (general info and specific info for wordpress) but nothing from those articles helped me. I tried adding a web.config with the following config...

nginx rewrite question

I need to do a rewrite with nginx from /blah/.../3275 to /id/3275 if the second file exists, otherwise I want to hand it off to apache. Here is my (feeble) attempt (...) represents irrelevant stuff if ($request_filename ~^/.../([0-9]+)/$) { if (-d /id/$1) { rewrite ^/.../[0-9]+/([0-9]+)/$ /id/$1; ...

How did dotnetkicks.com implement their ASP.NET paging?

I know the dotnetkicks.com system is open source so I can view the code myself but I can't make sense of how they did their paging. It's hard to explain but if you goto dotnetkicks.com you can play with the paging on their front page. What I am specifically interested in is how they show the first few pages, then "..." and then the last...

What is the WCF equivalent of HttpContext.Current.Request.RawUrl?

I've got some RESTful services running in a pure WCF context (i.e. ASP.NET compatibility is not enabled, and thus there is no HttpContext.Current object available). The URLs to the services are rewritten at the start of the request using an IHttpModule (which at that point does have an HttpContext and rewrites it using HttpContext.Curre...

URL scheme for a multi-version web app

I'm looking for the best URL schema to use for a web app that has multiple versions, namely several languages and a simplified version for use by mobile phones - both aspects can be combined, so there's an English regular and mobile version, a German regular and mobile version, etc. Goals (in order of importance): User-friendliness Se...

How do I configure extensionless URLs with the Visual Web Development server?

I'm using Visual Studios' built-in ASP.NET Development Server (VWD) to test my web site during development. I would like this ASP.NET web site to use extensionless URLs (pages don't require the aspx extension). Ordinarily I would configure a custom 404 in IIS that directs to an ASPX page. How would I do this with VWD? P.S. This is no...

Helicon Tech - ISAPI_Rewrite: RewriteRule's for specific domains

Could someone help me translate the following pseudo-code into code understood by Helicon Tech's ISAPI_Rewrite module: if (domain == something.com OR domain == www.something.com) { // The rules inside this scope will only apply to the domain: // something.com / www.something.com // This should match "something.com/test" and...