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.
0
votes
1answer
200 views
Nginx - redirect all url's to root (not show the HTML page in the URL?)
I need to turn my previous site running wordpress into a single page site. My site can only contain a landing page and I want all of the old URL's to 301 redirect to the root of my site.
I have this ...
0
votes
0answers
105 views
IIS7.5 - Using ARR url rewrite to pass traffic from a subfolder to Tomcat
I have a bunch of tomcat instances on my web server, but for simplicity, let's say I have 3.
Website1 is a tomcat instance listening on port 2005
Website2 is a tomcat instance listening on port 2015
...
0
votes
0answers
71 views
.htaccess - Simulating virtual host wrong link to Parent Directory in Directory Listing
I have a domain dedicated for my local server (.dev), and an .htaccess file which redirects requests like http://folder.dev/subfolder/ to /htdocs/folder/subfolder. It works great and all, except for ...
2
votes
1answer
59 views
How do I serve static files from an nginx map?
I have an nginx map inside a configuration that looks like this:
map $uri $route {
/route_a /path/to/a.html;
/route_b /path/to/b.html;
}
server {
listen 8080;
server_name example.dev;
}
...
1
vote
0answers
67 views
URL Rewrite error with Web Applications
I am running an ASP.NET 4.0 website using IIS7 on Windows Server 2008 R2.
The site has a number of Web Applications under the main domain (~/site1, ~/site2, ~/site3, etc...). Each Web Application is ...
0
votes
1answer
147 views
nginx load balancer rewrite to listen port
I have implemented load balancer using nginx as below:
upstream lb_units {
server 127.0.0.1:88 weight=7 max_fails=3 fail_timeout=30s; # Reverse proxy to BES1
server 10.200.200.107 weight=1 ...
2
votes
2answers
88 views
Nginx Rewrite redirection / to a directory
I am curently using nginx and I am trying to redirect all request on http://vhost.domain.com to http://vhost.domain.com/world
I've browse some sites but I am too rookie with rewrite to obtain a nice ...
0
votes
0answers
80 views
nginx mvc routing
i have a php application using cakephp also web server using nginx for webserver. i'm using assest manager for some process css on the fly. this is my vhost config
# /
location / {
# mvc rewrite
...
2
votes
1answer
67 views
Redirect one or more URL to just one, with regular expressions
In my website I have some pages that are reachable by two urls:
.../page
.../parameter/page
In order to optimize the website for the search engines, I have to redirect all .../page urls to ...
0
votes
0answers
39 views
Apache rewrite same url 2 seperate destinations
I have a website that runs a Java webapp on tomcat and I use mod_proxy to make life easy for users so they can visit the site:
http://client.mysite.com/myapp/.....
Annoyingly this webapp has an ...
1
vote
1answer
63 views
varnish3.0.2 rewrite the url howto
I have lots directories which have the same image "_a.png",like these:
/data/images/{a,b,c,d}
Because this, the varnish cache multiple copies.
Now I want to rewrite the urls to one,like this:
if ...
0
votes
0answers
63 views
Optional query string as key in RewriteMap
I have a rewrite map that has some keys with query strings and some without.
Is it possible to pass in the key based on the request depending on if it has a query string or not?
My current rewrite ...
2
votes
2answers
173 views
NGINX redirect all domains to one, but not server's own public and private IP addresses
I haven't been able to find a question that matches my particular scenario so, hopefully this isn't a duplicate, if so I apologize.
I have 4 web servers behind a load balancer. I want only ...
1
vote
0answers
104 views
URL Rewriting and Rack base paths
I'm trying to set up a Rails website on Bluehost and I'm having trouble with the path helpers. As I don't want to monkey-patch Rails, I'm trying to solve this through .htaccess. Here's the scenario:
...
1
vote
1answer
45 views
nginx - selective rewrite within a location block
Assuming a location block needs to handle URLs like
/test_api/group_1/version (several URLs fall in this group. For example, /test_api/aaa/version, /test_api/bbb/version)
...
0
votes
1answer
155 views
Reverse proxy in IIS to local TomCat
IIS has several websites:
domain1.com
a.domain2.com
b.domain2.com
There is also a TomCat running on
localhost:8087
The challenge is how to expose the TomCat externally as
b.domain2.com
...
3
votes
2answers
311 views
Disabling URL decoding in nginx proxy
When I browse to this URL: http://localhost:8080/foo/%5B-%5D server (nc -l 8080) receives it as-is:
GET /foo/%5B-%5D HTTP/1.1
However when I proxy this application via nginx (1.1.19):
location ...
3
votes
2answers
127 views
How do I set up URL Rewriting to a Heroku instance?
I'm more of an engineer than a devops guy, so please excuse me if this is extremely basic.
My situation: I have a server on the example.edu network, so I don't control the main DNS interface to ...
2
votes
1answer
194 views
Nginx all subdomain points to one subdomain (gitlab) rule
I have installed gitlab on my server and use nginx as http server... I simply used recipe for gitlab on nginx
# GITLAB
# Maintainer: @randx
# App Version: 3.0
upstream gitlab {
server ...
2
votes
1answer
66 views
nginx rewrite subdomain to file as a variable
How do you get the subdomain as a variable to add in a rewrite?
hello.example.com should go to example.com/user.php?u=hello but still display as just hello.example.com
I'm currently doing ...
0
votes
1answer
98 views
lighttpd: weird behavior on multiple rewrite rule matches
I have a 20-rewrite.conf for my php application looking like this:
$HTTP["host"] =~ "www.mydomain.com" {
url.rewrite-once += (
"^/(img|css)/.*" => "$0",
".*" => ...
0
votes
1answer
139 views
IIS Rewrite rule to redirect and remove query string
I'm trying to rewrite in IIS 7.5 from an old website to the new one. We have a list of URL's with and without query strings.
I can get the URL's without query strings to redirect but not with.
...
3
votes
1answer
169 views
Url rewriting stops working after changing default port on iis7
I have migrated the IIS6 webserver 2003 websites to IIS7 webserver 2008 using msdeploy tool. Application pool setting are changed with "Enable 32-bit Applications=true", ...
0
votes
1answer
34 views
apache rewrite debian vs windows
I have simple rewrite rules as I just learned about them
RewriteEngine On
RewriteRule ^dl/(.*)/.*$ dl/$1/index.php [L]
RewriteRule ^index.php$ upload.js [L]
both are working on Windows for url ...
0
votes
1answer
60 views
Nginx - Serving static content from deep directory strucutre
I have to store quite a lot of images (lets say 1M) for serving from Nginx, so to avoid having too many files in one folder I'm planning to break them out into folders with names related to the file ...
0
votes
0answers
40 views
Forward requests to IIS Application/Folder to Apache server on another port
I have found many questions and answers for ways of doing this using asapi filters or ARR and URL Rewrite, but none are clear and concise and I am sure many people have this issue.
I am looking for a ...
1
vote
0answers
121 views
nginx proxy_pass to different backends based on location / passing rewrited url
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;
...
2
votes
1answer
39 views
Protecting Directory with .htaccess
Unfortunately with a product I rolled out, blackhatters found they could access an unprotected directory where I had the zip files. I use PHP to serve up those zips with readfile(), so normally in my ...
0
votes
1answer
81 views
Capture part of the URI and use it to do conditional rewrites in Nginx
I am writing a location block for a Nginx config, and it is for URIs with pattern like this: www.mysite.com/a/b/blah/c or www.mysite.com/a/b/blah/c/n.
Where a and b are fixed, blah may vary, c can be ...
3
votes
1answer
122 views
It it possible to have multiple ReWrite rules that all do the same Action, for an IIS7.5 webserver?
I've got rewrite module working great for my IIS7.5 site.
Now, I wish to add a number of urls that all goto an HTTP 410-Gone status.
Eg.
<rule name="Old Site = image1" patternSyntax="ExactMatch" ...
0
votes
1answer
43 views
Simple NGinx rewrite is redirecting
I'm trying to setup a friendly URL for a website running on my Nginx server but for some reason, the url's are being redirected instead of being rewritten.
For instance If a user visits ...
0
votes
3answers
66 views
how to strip string from url using rewrite rule [duplicate]
Possible Duplicate:
Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask?
sometimes my drupal site add extra string to image url which causes the image to be ...
0
votes
1answer
61 views
existing file gives 404 due to a RewriteCond rule in .htaccess
To redirect a specific domain name to a folder in my public dir, www/, I edited .htaccess to the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.+)?domain.com$
RewriteRule ^(/)?$ ...
1
vote
2answers
122 views
Nginx rewrite rule with proxy pass
I'm trying to implement nginx rewrite rules for the following situation
Request:
http://192.168.64.76/Shep.ElicenseWeb/Public/OutputDocuments.ashx?uinz=12009718&iinbin=860610350635
Should be ...
0
votes
1answer
42 views
.htaccess Not Working as Expected
I have a hosted account not linked to any domain at /~me.
In the top level of my home directory I have a .htaccess file:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ...
0
votes
1answer
50 views
Setting expires header to multiple location block in nginx
In my nginx config, I have serveral location blocks, e.g.
location ~* /a { ..}
location ~* /b { ..}
location ~* /c { ..}
And I want to apply the expires header to all of above blocks, e.g.
...
0
votes
1answer
111 views
nginx: rewrite a non-existent php-file to another php-file with all arguments
i really need help here. Sitting for some time now and dont figured it out.
I want to realize a very simple task - rewrite a non-existent php file to another existant php file with all arguments ...
0
votes
1answer
52 views
Rewrite new url and block old url in nginx
I have a local folder /bar, and I want to be able access via http://www.example.com/foo.
So I have the config like
rewrite ^/foo/(.*)$ /bar/$1 last;
At the same time, I want to block public ...
0
votes
0answers
62 views
IIS: How to redirect only my main domain, but exclude specific subdirectories
I want to redirect my domain domain.xx to an other server but keep specific subdirectories like domain.xx/sub1(.*) on my IIS7. What's the Rewrite Rule for that?
Thanks for help!
0
votes
2answers
103 views
nginx url rewrites for php-urls
i have to permament redirect some old urls in nginx. the old urls are old-style php urls including a parameter for loading content. they look like this:
http://www.foo.com/index.php?site=foo
...
0
votes
0answers
66 views
.htaccess redirect for www in parent folder and children react
We were having a problem with the Norton seal not showing up on our affiliate marketing landing pages (landers). Turns out, the Norton seal was super picky about the "www." prefix. I had folder paths ...
0
votes
2answers
104 views
iis 7 url rewrite for search results
I have rewrites working for specific directories, but can't figure out how to get the search results rewrite to work.
If go directly to /blog/?s=coffee, it goes to the correct search results page. ...
0
votes
2answers
299 views
nginx and try_files: try named location with rewrites before fallback
I'm attempting a website cut-over. We want to preserve our external links by using 301 redirects. I have a lengthy list of redirects in a named location that resembles:
location @redirects {
...
0
votes
2answers
189 views
nginx: Disallow Acces to a Folder, except some subfolders
how it is possible to deny access to a folder, but execept some subfolders in it from "deny"?
I tried something like this (in this order):
#this subfolder shouldnt be denied and php scripts inside ...
0
votes
0answers
127 views
HAproxy URL rewrite
I have an API and I changed the URL scheme to it, from
http://example.com/thumbs.php?size=l&url=expedia.com
to
http://free.example.com/v2/thumbs.php?size=l&url=expedia.com
While a simple rule ...
2
votes
1answer
56 views
Nginx redirect a particular page from https to http
How can I redirect a specific https page to http, example:
https://example.com/foo -> http://example.com/foo
Only for the page foo, and no other page.
Thank you.
0
votes
0answers
172 views
htaccess rewrite rules in Nginx: setting the rewrite path
I have a htaccess file I'm trying to convert into an nignx config file.
Here's my htaccess file.
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ...
1
vote
1answer
273 views
Prevent URL Rewrite rules from being inherited by subdirectories in IIS7
I have a URL Rewrite setup for clean URLs in a CMS and my web.config looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
...
0
votes
1answer
109 views
Plus sign ( + ) in a rewrite rule (.HTACCESS on Linux Server) (SOLVED)
i've this snippet, but it doesn't works. Obviously is that plus sign + tha must be escape ?
RewriteCond %{QUERY_STRING} ...
0
votes
1answer
28 views
apache2 adding named virtual host over existing mod
I have a dav_svn.conf look like this.
# mod-available/dav_svn.conf
<Location /svn>
DAV svn
SVNParentPath /path/to/svn/parent
...
</Location>
With this configuration every ...