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
15
votes
3 answers

Unable to remove a URL rewrite from IIS7

I've spent hours trying to solve this so I'm posting as a last resort.. I've tried removing some URL rewrites that were pointing a webpage from HTTP to HTTPS. Upon deleting the rewrite it is still sending me to HTTPS. I've tried; Manually editing…
moodah
  • 151
  • 1
  • 1
  • 6
15
votes
4 answers

Can Intelligencia.UrlRewriter be made to work in IIS7?

We've inherited an application that uses the Intelligencia.UrlRewriter module. Our environment though is IIS7. We've already set our site to run in the classic asp.net application pool (which aparantly works for a lot of these kinds of problems).…
Heath Allison
15
votes
2 answers

How to rewrite paths with Traefik when using path prefix rules?

My Traefik config for WordPress contains the following docker-labels: - "traefik.backend=wordpress" - "traefik.docker.network=web" - "traefik.frontend.rule=Host:MyHostName.net;PathPrefix:/blog" - "traefik.enable=true" - "traefik.port=80" Now…
eventhorizon
  • 2,977
  • 8
  • 33
  • 57
15
votes
4 answers

URL Rewrite Outbound Rules IIS7

Experimenting with URL rewrites using this module, however I'm getting the following error when attempting to hit the URL. Looked online for answers, but not sure what the best way to get around this is.... any ideas?? HTTP Error 500.52 - URL…
denisb
  • 787
  • 5
  • 18
  • 31
15
votes
10 answers

websites urls without file extension?

When I look at Amazon.com and I see their URL for pages, it does not have .htm, .html or .php at the end of the URL. It is like: http://www.amazon.com/books-used-books-textbooks/b/ref=topnav_storetab_b?ie=UTF8&node=283155 Why and how? What kind of…
James Musser
  • 735
  • 5
  • 13
  • 18
15
votes
1 answer

IIS URL rewrite module url's to lowercase

For better SEO we are using URL rewrite to convert all the URL's to lowercase. I set this one as mentioned in this the below article. Everything is working fine from URL perspective, but we see lot of 301 redirects when we check in fiddler. It…
Tippu
  • 1,191
  • 4
  • 16
  • 36
15
votes
1 answer

Curly braces ({ and }) from Apache to Nginx rewrite rules.

I have this rules that sucessfully worked on apache but return error or nginx : rewrite ^/saison-([0-9]{1})$ /pages.php?cat_page=saison-$1&season=$1 last; rewrite ^/saison-([0-9]{1})/([a-z0-9-]+)$ /evenements.php?season=$1&title=$2 last; rewrite…
Hugo H
  • 6,029
  • 5
  • 37
  • 57
15
votes
9 answers

My http://localhost/ redirecting to www.localhost.com

I checked my httpd.conf file and nothing found anything, let me know other areas whr i need to look. Although my other links are working fine like -- http://localhost/phpmyadmin/ or http://localhost/myprojects/ This is what i have in my httpd.conf…
swapnesh
  • 26,318
  • 22
  • 94
  • 126
15
votes
1 answer

Nginx per location / pass rewriten uri to proxy_pass

What the quickest and cleanest solution if you want to proxy URL request to two different backends via proxypass based on location. location /app1/ { alias /var/www/ruby/public; proxy_set_header X-Real-IP $remote_addr; proxy_set_header…
lowk3y
  • 183
  • 1
  • 2
  • 6
15
votes
4 answers

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…
djmzfKnm
  • 26,679
  • 70
  • 166
  • 227
15
votes
2 answers

Are there any downsides to using double-slashes in URLs?

I've written my own MVC framework in PHP, which uses urls in the format of: /controller/method/param1/param2/param... I've made it so that "default" methods can be ignored (by default index()), so this results in URLs like…
wyqydsyq
  • 1,992
  • 1
  • 20
  • 28
14
votes
4 answers

Nginx: Return 301 Redirect When 404 Error

What I want to do whenever I get a 404 error on my domain, automatically 301 to the homepage. I have a lot of old blog posts and such that were linked to, but I don't have them on the blog and if anyone happens to click through from another site…
Noah Clark
  • 8,101
  • 14
  • 74
  • 116
14
votes
2 answers

htaccess rewrite rules with mod_GeoIP

I'm having some issues with mod_geoip for an ecommerce site that has 3 different stores. We have our main store at root/store, but also have have stores at root/ukstore and root/austore. The main root/store contains a /skin, /media, and /js…
coloradohiker
  • 221
  • 3
  • 11
14
votes
7 answers

RewriteRule in Apache with Symfony2 not removing app.php

I have the following .htaccess file in my web directory for my Symfony2 installation: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) app.php [QSA,L] However, when I try…
celestialorb
  • 1,901
  • 7
  • 29
  • 50
14
votes
2 answers

How do I configure JSF url mappings without file extensions?

Most tutorials propose a default JSF configuration similar to the following web.xml: javax.faces.DEFAULT_SUFFIX .xhtml Faces…
Arno Fiva
  • 1,459
  • 1
  • 13
  • 17