url-rewriting

How can I rewrite query parameters to path parameters in Apache?

I currently have a website that I am trying to optimize in terms of SEO. I've got the site working with URLs such as: domain.com/?app=about In my app, $_GET[app] is set to 'about', as expected. Now, I want to make it so that a URL like domain.com/about is treated as if it were domain.com/?app=about. How can I do this in an Apach...

IIS 7.0 URL Rewrite Module - Root URL doesn't display

Hi, I'm trying to setup a PHP website in IIS 7.0 with URL rewriting enabled using this module (http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1691) I've got the whole thing running fine for inner pages of the site, but my root URL "/" doesn't work any more. I want the structure of my URLs to be www.test.com/test-page...

How to handle special characters in .htaccess rules?

In my .htaccess file I have defined following rule, RewriteRule t/([^.]+)/$ /videos/tag.php?tag=$1 [QSA] The above rule works fine if I am browsing http://example.com/videos/t/world+news/ or http://example.com/videos/t/events/ but when I am browsing http://example.com/videos/t/business+%26+world/ (here original tag is: business & w...

if else .htaccess/ISAPI

I would like to check a URL to see if it contains one of multiple strings, and then based on that, send it to a different URL. Am I forced to use multiple lines, one for each possibility? Or is there anyway to form an if statement? I figured that something like this should work: (string1)(string2)(string3) example.com/$1$2$3 because in...

Java HTTP Proxy

I am working on a project where we'd like to pull content from one of our legacy applications, BUT, we'd like to avoid showing the "waiting for www.somehostname.com/someproduct/..." to the user. We can easily add another domain that points to the same server, but we still have the problem of the someproduct context root in the url. Sim...

[jQuery] Update URL on AJAX call?

Right now the biggest issue I'm having with using AJAX is the fact that if I use AJAX on a page, go to another page, then use the browser's back button to go back anything that was changed with AJAX is gone. I've thought about using the jQuery Addresss plugin to solve that problem but I don't like how it only amends the URL with "#whate...

Cucumber default_url_options[:host] everytime "www.example.com" even if specified in environtemnts/test.rb

Hello, I specified the default_url_options in my environments/test.rb with config.action_mailer.default_url_options = { :host => "www.xyu.at" } This is quite ok and in my cucumber story, where i test registration of users, the user-activation link gets generated right invitation_activation_url(1) => "www.xyu.at/signup/1231hj23jh23" ...

Helicon Isapi rewrite - can't get urls to be case insensitive

Running Helicon Isapi rewrite to make overly long coldfusion CMS generated urls 'friendly'. Works very well and we've been using it for several years both with direct rewrites and regex. I cannot get it to treat urls case insensitively. The following rule is an example: RewriteRule /scriptcontent/h1n1/h1n1submission.cfm\?section=Human...

URL and Query management Asp.Net C#

Ok so while back I asked question http://stackoverflow.com/questions/986598/beginner-asp-net-question-handling-url-link I wanted to handle case like this www.blah.com/blah.aspx?day=12&flow=true I got my answer string r_flag = Request.QueryString["day"]; Then what I did is placed a code in Page_Load() that basically takes these paramet...

Regex to match a URL pattern for a htaccess file

I'm really struggling with this regex. We're launching a new version of our "groups" feature, but need to support all the old groups at the same URL. Luckily, these two features have different url patterns, so this should be easy? Right? Old: domain.com/group/$groupname New: domain.com/group/$groupid/$groupname The current regex ...

How do I route images using ASP.Net MVC routing?

I upgraded my site to use ASP.Net MVC from traditional ASP.Net webforms. I'm using the MVC routing to redirect requests for old .aspx pages to their new Controller/Action equivalent: routes.MapRoute( "OldPage", "oldpage.aspx", new { controller = "NewController", action = "NewAction", id = "" }...

Intelligencia.UrlRewriter rule help

Hi, i have got below rule that works fine with standart domain names like .net.com,.mobi but if domain name has 2 parts like co.uk it doesn't work. How can i adjust it so it would work with .net,.com and .co.uk at same time? <if header="HTTP_HOST" match="^(?:www\.)?([^.]+)\.([^.]+)\.([^.]+)$"> <set property="subdomain" value=...

Creating search engine friendly URL's in ASP.NET MVC

I would like to develop URL's which look like the following: http://mysite.com/products/1/best-product-in-the-world Where all i need to get to the proper record is the following route: http://mysite.com/products/1 When I add the product description piece to the URL ("best-product-in-the-world") I get URL encoding issues. I've tried...

Help with htaccess redirect rewrite rule

I want to use Helicon ISAPI Rewrite to redirect an old URL to a new URL, but only within a virtual directory named colors: http://www.mydomain.com/colors/default.aspx?id=blue needs to redirect to http://www.newdomain.org/colors/default.aspx?id=blue I am new to this and cannot find an appropriate example, so any help would be appreci...

Java Seamframework - Restful URLs - How to?

Hey there, I'm planning on starting a web project, and I've been searching for the best option. Ultimately I choose to stick with Java + Seam + J Boss AS + JPA Hibernate. But regarding URL Rewriting its been a really long run, without many accomplishments. I'll have a hierarchical structure, Ex. Category -> Sub-category -> Sub-sub-cat...

How to redirect non-www to www URL's using htaccess?

I have a website say http://www.example.com/ in the root of my website, I have added .htaccess file to redirect any request of http://example.com/ to http://www.example.com/ Recently I have created a new section "Videos" so the URL for videos is http://www.example.com/videos/ . In this video folder I have another htaccess file which is ...

Please help with urlrewriting.net Component

On my page: Admin/Manage.aspx there are links like this: NavigateUrl='<%# "~/ShowArticle.aspx?id=" + Eval("ID") +"&amp;name=" + Eval("Title") %>'/> So the generated link is: "http://localhost:1410/TheBallProject/ShowArticle.aspx?id=17&amp;name=This is a Test" I want it to appear like this: "http://localhost:1410/TheBallProject/17/T...

How do you set up IIS 7.0 URL Rewrites without IIS Manager?

Does anyone know how to write your own specifications for the built-in URL Rewrite Module in IIS 7.0? We are using a shared host that does not allow use of IIS 7.0 Remote Manager on shared accounts, but we'd like to employ URL rewriting for SEO purposes. All of the literature I can find relates to the URL Rewrite Module setup requiring ...

rewritemaps with an external config to force an application pool recycle

Hi I have the following defined in my web.config ( <rewriteMaps configSource="Rewrites.config" /> I have a CONFIG file that can be regenerated by an administrator via a web page. However when this file changes then the new changes are not picked up until the application recycles. My queestion is that I want to be able to recycle th...

URL Rewriting in .NET behaves badly with cookieless sessions

I'm currently using Intelligencia's URL Rewriter .NET HTTPModule to rewrite URLs. I am using its Custom Transform feature, which allows me to supply an assembly containing a method that performs the actual URL transform. I have cookieless sessions turned on, and this is causing some interference with the URL Rewriter. So, let's sa...