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
0
votes
1 answer
Front-ending several web applications on port 80 using a proxy
I have several web applications hosted on an AWS server on different ports, e.g.
app1: http://x.x.x.x:8080
app2: http://x.x.x.x:9000
...
I would like to a proxy in front of these apps (apache, nginix etc.) so that all of them can be accessed using…

Naresh
- 103
- 2
0
votes
0 answers
How to make subdomain point to a different path without a redirect?
How can I make http://param1.domain.com act as if it's loading http://domain.com/param1 in Nginx? I do not want to redirect to http://domain.com/param1. So far I have created a new server block containing the following:
...
server_name…

tenub
- 101
- 1
0
votes
1 answer
Lighttpd: How to migrate a rewrite rule?
i'm using this htaccess rule on a apache:
RewriteEngine on
RewriteCond %{HTTP_REFERER} example\.com [NC]
RewriteRule .* - [F]
.. and i would convert it to an lighttpd rewrite rule. How can i do this? I tried it but it does not work very well.

hazelnut
- 25
- 1
- 8
0
votes
1 answer
nginx valid_referer for all files inside a directory
I have this config
location /mirror/files {
valid_referers none server_names example.com *.example.com;
if ($invalid_referer) {
rewrite ^/(.*)$ http://example.com/;
}
index index.php;
}
If I visit a link…

Sandro Antonucci
- 183
- 2
- 10
0
votes
2 answers
nginx Subdirectory Rewrites for MVC
I am tasked with administering a web application that has a base directory with a bunch of legacy code in it, and a subdirectory of my own making with an MVC based API which we are using to slowly migrate the front end to a SPA model. The owner has…

Peter
- 123
- 1
- 1
- 7
0
votes
1 answer
Nginx redirect for specific file extension
I'm having trouble setting up the redirects for a Magento extension. The URL requested is:…

dawns
- 1
- 3
0
votes
1 answer
How to make Nginx include index.php in file paths for sub-directories as well (Magento Multistore)
Running multistore setup with Magento on an Nginx server. I'm watching the access logs and can plainly see what is happening. Like many PHP web apps, it uses index.php in its URLs and I have it set to "hide" it from the visible URL to keep it…

sparecycle
- 459
- 1
- 6
- 19
0
votes
2 answers
nginx rewrite if requst_uri contains some numbers
I'm having a little problem with some rewrite rules for a website.
My permalinks are now something like domain.com/ID/permalink-ID.html
The old structure of permalinks was domain.com/permalink-ID.html
That ID is an integer number.
How can i create a…

Aurelian
- 1
- 1
0
votes
1 answer
Convert apache rewrite rules to nginx
I want to migrate an Apache setup to Nginx, but I can't get the rewrite rules working in Nginx. I had a look on the official nginx documentation, but still some trouble converting it. http://nginx.org/en/docs/http/converting_rewrite_rules.html
I've…

Shiyu Sekam
- 13
- 1
- 5
0
votes
2 answers
RewriteRule Works With "Match Everything" Pattern But Not Directory Pattern
I'm trying to redirect newsletter URLs from my local server to an Amazon S3 bucket.
So I want to redirect…

kmgdev
- 125
- 1
- 9
0
votes
1 answer
Lighttpd splitting request URI and dropping query parameter
I'm running lighttpd 1.4.33, which is reverse proxied to from an Apache server that is open to the Internet. When accessing a script from the local address of the lighttpd server, GET parameters are passed to the script just fine, and I get the…

Libbux
- 295
- 1
- 2
- 14
0
votes
0 answers
Nginx PHP index.php rewrite not allowing proxy pass to '/writing'
What I'd like: I want to have the laravel site show unless it's for /writing. In that case I want it to proxy pass anything in that subdirectory to a nodejs site.
What happens: The laravel site catches the request and says it can't find the…

cmp
- 101
- 2
0
votes
1 answer
htaccess and rewrite - Internal redirect within Alias
I have the following .htaccess within a subdirectory:
RewriteEngine on
RewriteRule ^file.js$ file.php
The directory, containing the above and other files looks like this:
dir/
├── index.html
└── js
├── file.php
└── .htaccess
I want my…

thyandrecardoso
- 145
- 1
- 7
0
votes
1 answer
can htaccess file define different RewriteBase for production and dev servers
I have htaccess files that use different RewriteBase on production and dev (windows) pc.
Currently I change the RewriteBase manually when deploying.
Can this be done automatically with some definition? The dev servers is windows 7 and production is…

Niro
- 1,401
- 4
- 20
- 36
0
votes
1 answer
How can I have users coming from the internet and a private WAN access the same web portal?
I am trying to configure access to a web portal hosted on a private WAN for internet users, originally the plan was to use split-DNS to resolve the hostname depending on what ip the client was coming from, but this can't be done because the public…