Questions tagged [url-rewriting]

A URL rewrite engine is software that modifies a web URL's appearance (URL rewriting). Rewritten URLs are used to provide shorter and more relevant-looking links to web pages, to route users from obsolete URLs to replacements, or to simplify the format of the URL for human readability. The technique adds a degree of separation between the files used to generate a web page and the URL that is presented to the world.

A URL rewrite engine, part of a web server's URL-to-filename mapping engines, is software that modifies a web URL's appearance (URL rewriting). Rewritten URLs (sometimes known as short, fancy URLs, or search engine friendly - SEF) are used to provide shorter and more relevant-looking links to web pages, to route users from obsolete URLs to replacements, or to simplify the format of the URL for human readability. The technique adds a degree of separation between the files used to generate a web page and the URL that is presented to the world. It is integral in frameworks that route all URI requests through a routing script or a controller.

Useful links

  1. and its tag-wiki for some examples regarding the most widely-used implementation for the Apache web server.
  2. and its tag-wiki for an implementation for java/j2EE technology.
20479 questions
31
votes
7 answers

How to show Ajax requests in URL?

What I want is to have links which change a part of the page , and a dynamic URL for it, where I can specify variables such like #calendar=10_2010tabview=tab2 Check this for an exact example: CLICK HERE FOR EXACT DEMO So here is the link format what…
Adam Halasz
  • 57,421
  • 66
  • 149
  • 213
31
votes
6 answers

URL Rewriting with ExpressJS

I would like to rewrite my URLs on my ExpressJS website. I've used this plugin, https://github.com/joehewitt/express-rewrite, but it doesn't work... However, I might have made a mistake... My app.js file : var express = require('express') ,…
tonymx227
  • 5,293
  • 16
  • 48
  • 91
31
votes
3 answers

IIS AAR - URL Rewrite for reverse proxy - how to send HTTP_HOST

Trying to use AAR as a reverse proxy in front of several back end IIS servers. One public ip address assigned to the server running IIS/AAR Then outbound URL rewrite rules are setup to redirect to one of several back end servers depending on…
Ryan
  • 23,871
  • 24
  • 86
  • 132
30
votes
2 answers

How to write a url rewrite in nginx?

I want people type in http://www.myweb.com/like/1234456 will redirect to http://www.myweb.com/item.php?itemid=1234456 I wrote something like this in the config but it doesn't work. location = ^~/like/ { rewrite ^1234456 …
murvinlai
  • 48,919
  • 52
  • 129
  • 177
30
votes
4 answers

php get url of redirect from source url

I have this link: http://libero-news.it.feedsportal.com/c/34068/f/618095/s/2e34796f/l/0L0Sliberoquotidiano0Bit0Cnews0C12735670CI0Esaggi0Eper0Ele0Eriforme0Ecostituzionali0EChiaccherano0Ee0Eascoltano0Bhtml/story01.htm If you visit it, this…
michele
  • 26,348
  • 30
  • 111
  • 168
30
votes
8 answers

How to remove index.php from URLs?

All of my URLs on my Magento installation require index.php in them, like: http://example.com/index.php/admin/ http://example.com/index.php/customer/account/login/ The problem is that the system by default links to URLs…
delwin
  • 830
  • 2
  • 10
  • 15
29
votes
2 answers

What does this this HTTP Authorization RewriteRule do?

I have an rewrite recursion error somewhere on my website that Google Bot caused, but I can't find the url that caused it because my Loglevel is low. I raised it but it has not happened again so far. RewriteRule .* -…
The Surrican
  • 29,118
  • 24
  • 122
  • 168
29
votes
2 answers

IIS URL Rewrite Module : Redirect Based On QueryString

I Have some problems with redirecting to another URL based on the query string parameters. I want to redirect users which enter www.domain.com/signup.aspx?p=1 to: www.domain.com/signup
Martijn B
  • 4,065
  • 2
  • 29
  • 41
29
votes
2 answers

nginx rewrite WITHOUT change url

I want to use rewrite function in my nginx server. When I try "http://www.example.com/1234", I want to rewrite "http://www.example.com/v.php?id=1234" and want to get "http://www.example.com/1234" in browser. Here is nginx.conf file ... location ~…
user1850593
  • 325
  • 1
  • 3
  • 7
28
votes
5 answers

Remove parameters within nginx rewrite

I'm rewriting URLs in nginx after a relaunch. In the old site I had query parameters in the URL to filter stuff e.g. http://www.example.com/mypage.php?type=4 The new page doesn't have these kind of parameters. I want to remove them and rewrite the…
lorem monkey
  • 3,942
  • 3
  • 35
  • 49
28
votes
4 answers

Proper method to remove www from address using IIS URL Rewrite

What is the optimal way to remove the www subdomain from a url using IIS URL Rewrite?
Chris Marisic
  • 32,487
  • 24
  • 164
  • 258
28
votes
2 answers

IIS7 urlrewrite module - Rules in external xml file

I'm using IIS7 UrlRewrite module. I set up my rules in the web.config section. I want to know if there's a way to define the rules in one external xml file instead of in web.config file. Thanks.
opaera
  • 761
  • 2
  • 8
  • 8
28
votes
4 answers

IIS7 URL Rewrite - Add "www" prefix

How to force example.com to be redirected to www.example.com with URL rewriting in IIS7? What kind of rule should go into the web.config? Thanks.
niaher
  • 9,460
  • 7
  • 67
  • 86
28
votes
4 answers

Redirect to https through url rewrite in IIS within elastic beanstalk's load balancer

How do you use IIS's url rewrite module to force users to use ssl while you are behind an elastic beanstalk load balancer?
28
votes
13 answers

IIS UrlRewrite is not working for IIS 8

I have just moved my website to new computer which uses IIS 8 from one has IIS 7.5. All but URL rewriting is working well. there is no error message than "HTTP Error 404.0 - Not Found" which I got. What I've only recognized is, there is an entry…
alper
  • 389
  • 1
  • 3
  • 5