URL Rewriting maps an incoming URL to a modified URL, so that the request is processes as if the original request was made to the modified URL. This is often used to provide more search engine friendly URLs.
Questions tagged [rewrite]
2112 questions
5
votes
1 answer
Rewrite IIS served subdomain with content from other server/port
Our main web server is using IIS 6 and it obviously catches all port 80 traffic and we have another app served on a non-standard port (8443) that is hosted using Apache.
For example:
http://www.mydomain.com -> IIS6…

Reddog
- 153
- 5
5
votes
2 answers
How to enable the rewrite feature in nginx 1.0.5?
I recently installed nginx 1.0.5 with php fpm, php apc and postgres.
I just want to play around with nginx and learn how to configure the basic stuff. For extended testing I decided to install PHPBB3 (went well) to see if PHP + Postgres access…

PythonLearner
- 1,032
- 2
- 12
- 31
5
votes
1 answer
nginx rewrite rule for using domain host to redirect to specific internal directory
I'm new to Nginx rewrites and looking for help in getting a working and minimal rewrite code. We would like to use urls like 'somecity.domain.com' on campaign materials and have the result go to city-specific content within the 'www' site.
So, here…

user85836
- 51
- 1
- 1
- 2
5
votes
2 answers
NGINX Redirect Rule: Subfolder only to HTTPS?
I'm trying to redirect anyone who access the admin section of my site to the HTTPS version of it. The current rewrite rule is as follows:
server {
listen 80;
server_name domain.com;
location / {
…

Professor Frink
- 529
- 4
- 7
- 15
5
votes
1 answer
which is my Web.Config on IIS 7.5
i googled this and found it is storing inside my asp framework folder...
but may i know which is the right web.config file for my specific application ?
there is too many application running... and i found many web.config
i'm using window server 64…

1myb
- 201
- 1
- 4
- 10
5
votes
2 answers
Redirecting to the IP of an amazon EC2 instance
As you know amazon EC2 instances get an address like:
ec2-72-44-40-153.z-2.compute-1.amazonaws.com
If I have the domain example.com, is there any way that I can make bob.example.com or preferably example.com/bob redirect to the IP of…
robert
5
votes
4 answers
How to redirect non-www to www without hardcoding using .htaccess?
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
...causes a perfect, non-hardcoding 301 redirect from "www to non-www", what would the exact opposite look…
Lizzy
5
votes
2 answers
IIS 7 rewriting subdomain to point at a specific port
Having installed Team Foundation Server 2010 on Windows Server 2008, I need an easy URL for our developers to access their repositories.
The default URL for the TFS repositories is http://localhost:8080/tfs
Now I want the subdomain domain…

Tommy Jakobsen
- 259
- 5
- 10
5
votes
1 answer
Nginx: Rewrite rule for subfolder
I have a subdomain where I want to keep projects I am working on, in order to show these projects to clients.
Here is the configuraion file from /etc/nginx/sites-available/projects:
server {
listen 80;
server_name projects.example.com;
…

Misha Reyzlin
- 155
- 1
- 1
- 7
5
votes
2 answers
Broken URL rewriting on Django/modwsgi setup
I am trying to setup my Django app to run under Apache with modwsgi. I have defined the following virtualhost:
ServerName www.domain.com
ServerAlias domain.com
WSGIScriptAlias / /home/domain/apache/django.wsgi
…
user31196
4
votes
1 answer
Exclude path from RewriteRule using RewriteCond in Apache2
I have Apache server version 2.4.18 (Ubuntu).
I have conditional RewriteRule that applies to most parts of my site. I want to exclude paths starting with /norewrite from that rewrite.
The rewrite looks like this:
RewriteCond

Madoc Comadrin
- 570
- 4
- 11
- 29
4
votes
1 answer
Apache - Should I use "ProxyPass ..." or "RewriteRule ... [P]" to proxy requests?
The apache documentation says that you can use mod_rewrite to do similar things to mod_proxy, by using the [P] option. Which should I use? Or is there no difference?
Right now I'm using ProxyPass from mod_proxy, because I also want to include…

Amandasaurus
- 31,471
- 65
- 192
- 253
4
votes
1 answer
Trying to get Friendly URL's to work
I have been working on getting friendly URLs to work.
On my site I have something like this:
http://www.example.com/blog/newpost.php?id=Reasons+to+Use+a+Small+Business+Consultant
I would like it to look something like…

Donna Delour
- 424
- 5
- 10
4
votes
1 answer
Regex rewriting with map
I have a url.map containing a rewrite rule
~^/A/shopby/(?[a-zA-Z]+) ~^/category/by-brand/$brand;
so that /A/shopby/a_brand will be redirect to /category/by-brand/a_brand
And also a config file
map $request_uri $new_uri {
include…

Chung
- 182
- 1
- 1
- 7
4
votes
2 answers
How to manage URL rewrites with a GCP load balancer?
We have a single-page web application deployed on a GCP bucket with a load balancer in front of it.
All URLs such as example.com/login should be rewritten as example.com/#/login. Without being rewritten the default behaviour is to go fetch some…

Kyll
- 141
- 1
- 5