0
votes
0answers
33 views

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 ...
0
votes
1answer
85 views

htaccess and rewrite - Internal redirect within Alias

I have the following .htaccess within a subdirectory: RewriteEngine on RewriteRule ^file.js$ file.php This works by internally redirecting the request to the PHP file, with the same name, which is ...
0
votes
1answer
29 views

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 ...
0
votes
3answers
46 views

How to remove hypen (-) using nginx rewrite rule?

I am using this rewrite rule to redirect example.com/a-b-c?id=learn-more ----> http://example.com/abc?id=learnmore rewrite ^/a-b-c?id=learn-More http://example.com/abc?id=learnMore permanent But ...
0
votes
1answer
63 views

redirect string to different url in nginx

I want to redirect a string to different URL in nginx. This what my vhost looks like and is working fine. server { listen 80; server_name secure.example.com; root /opt/tomcat/webapps/test/; ...
0
votes
1answer
57 views

How can I rewrite from /page to /xx/page, using htaccess & apache only?

Hi I have found many resources on mod-rewrite and Apache but I haven't been successful of making a working example. The example below works for ✓ WORKS example.com/en/page1.php ☞ ...
0
votes
1answer
58 views

redirect landing without changing url

I'm working with Apache and Joomla. I would like to have some URIs that land to the same landing page, but avoiding the URL changes. So, for example: examplecom/luggage/delay/iberia ...
3
votes
1answer
252 views

IIS web.config Old URL to New URL redirects

I'm new to redirects and having a hard time getting these to work, I have about 1400 URL's from an old site that need to redirect to a new site, same domain name, but different folders and domain ...
1
vote
1answer
124 views

Rewrite nginx rule for for a directory to another domain/sub domain

i have setup the following nginx rewrite rule . But doesn't seems to be working, * location /images { rewrite ^(.*)$1 http://sub.domain.com/$1 permanent; } * for images i'm trying to ...
2
votes
2answers
3k views

Nginx Redirect via Proxy, Rewrite and Preserve URL

In Nginx we have been trying to redirect a URL as follows: http://example.com/some/path -> http://192.168.1.24 where the user still sees the original URL in their browser. Once the user is ...
0
votes
0answers
200 views

Redirect only /index.php page and allow access to all sub directories

I'm running ExpressionEngine (www.mywebsite.com) as the root of my website and Magento in a sub directory (www.mywebsite.com/store) I'm trying to redirect the Magento homepage (and only the homepage) ...
1
vote
1answer
40 views

Is it possible to redirect a url to another url so that users see always the original url?

I have a website whose url is subdomain.example.com but I want users to use a different url to access it, example.com/subdomain. Just to add a bit of context, the two domains are on two separate ...
0
votes
0answers
79 views

IIS 7.5: Redirect domain alias to specific page

We have a website that host pages for multiple companies, typically they redirect a pag on their website to our website. However, we have a client that wants a custom domain. So we have traffic ...
0
votes
0answers
42 views

nginx rewrite subdomain to other subdomain

I have a atlassian server with the following config: server { listen 443; server_name servicedesk.example.nl; ssl on; ssl_certificate certs/jira.cer; ssl_certificate_key ...
1
vote
2answers
1k views

How to check if mod_alias is enabled?

I want to try mod_alias instead of mod_rewrite for a couple of simple redirect rules, but the directives don't seem to be working when entered in .htaccess. Is it possible that mod_alias is not ...
0
votes
1answer
591 views

Ngnix Rewrite - If URL contains

I'm having a small issue - my error log is filling up with requests to a directory folder on my site (but with added data that shouldn't be there). http://example.com/the-directory/undefined ...
0
votes
2answers
1k views

How to redirect or rewrite IIS site with port in URL to URL without port?

I'm not 100% sure if this is the right part of StackOverflow to post this but to me it made the most sense. Sorry if its not! Currently I have a site in IIS configured on HTTPS with port 7500. I can ...
4
votes
2answers
2k views

Temporarily redirect *all* HTTP/HTTPS requests in IIS to a “server maintenance” page

We've got an IIS server that hosts hundreds of separate web apps, and the physical database server that hosts these apps is going to be taken offline for maintenance for a brief period (we expect it ...
0
votes
1answer
183 views

Nginx - Rewrite Domain to Domain with full URL

I need to setup nginx to rewrite "www.test.com" to "www.new-test.com/test/test?foo=bar&bar=foo". I've tried the following code: server { listen 80; server_name test.com www.test.com; ...
0
votes
1answer
940 views

Nginx: Rewrite/Redirect URLs in a subdirectory to root

I want to rewrite or redirect any URLs inside a subdirectory to root, like so: www.site.com/subdirectory/item => www.site.com/item I tried this, but doesn't seem to work properly: location ...
0
votes
2answers
311 views

HTTP redirect with IIS 7.5

I have two intranet ASP.NET MVC web applications hosted in one website which could be accessed by the paths: localserver/old and localserver/new. I've moved logic from the first app to the second app ...
0
votes
1answer
150 views

.htaccess URL rewrite to upper-case characters in domain

For example, I'd like to have foobar.com show FooBar.com This almost works, but ends up forcing a redirect loop: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?foobar.com\.com RewriteRule ^(.*)$ ...
0
votes
2answers
41 views

URL rewriting with nginx

I've recently set up a virtual host using nginx. The website being hosted needs to redirect URL's containing '/old/' - to the same url without '/old/'. For example: www.mywebsite.com/old/a/b/c to ...
1
vote
0answers
142 views

Prevent Google Image Search hotlink with Nginx rewrite

Google Image Search have the ability to point to the original image without displaying the website that's hosting the image. So I want to redirect those requests to a custom page of my site. ...
0
votes
1answer
189 views

Having twice a “location / {}” block in nginx

For all our sites we have an include file which contains several things, amongst this line: location / { try_files $uri /index.php?$query_string; } For a single site, we do want to redirect ...
1
vote
3answers
381 views

nginx: How to redirect root to subdirectory while maintaining URL in the address bar

I have an nginx setup with folder structure like this: - www |- splash |- blog www is the root folder. I would like to redirect users who access http://mysite.com to the splash folder. But I don't ...
0
votes
1answer
359 views

Nginx Rewrite with a question mark

I am trying to force Nginx to redirect/rewrite one URL that uses a query string /?cat=20 to /category/lighttpd/. Here is what I tried, which is not working: location ~ /\?cat=20 { rewrite ^ ...
1
vote
2answers
662 views

nginx redirect to www.domain

I want to redirect the site ALWAYS to www.site.com. However, I am not sure as to how to get the WWW to always show up in front should say someone type in the domain without the www. EDIT: server { ...
1
vote
4answers
93 views

apache rewrite rules https to directory

I want apache to: redirect http users to https if they access http(s)://example.com/1234 redirect to /view/1234 I have tried different flavours but cannot get it work. When a user access the ...
1
vote
1answer
529 views

URL rewriting between different pools with different authentication in IIS

I have an IIS application and three sub-applications as follows: CMT (Windows and Anonymously authenticated) - CI - EM - Website (Windows authenticated) CI and EM are helper web services and ...
0
votes
1answer
683 views

nginx try_files redirect trailing slash and 403 Forbidden

I am trying to create a combined "super cache" -> file -> module pattern with try_files ("super cache" term taken from wordpress super cache as it is a similar method). The files that are applicable ...
2
votes
2answers
398 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 ...
4
votes
2answers
784 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
417 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 ...
0
votes
1answer
216 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
2answers
2k 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 { ...
2
votes
1answer
305 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
2answers
46 views

forcing nginx to redirect to server root

I have the following line in nginx: try_files $uri $uri/ /index.html; As far as I understand, it rewrites all queries to files that are not found to index.html. Meaning, that index.html?foo=bar and ...
1
vote
2answers
187 views

nginx rewriting location of permanent rewrites

I am trying to redirect from mydomain.com to www.mydomain.com .. However, nginx is rewriting the location-header to $host. server{ server_name mydomain.de; set $root /srv/www/mydomain.de; ...
1
vote
0answers
145 views

Lighttpd single subdomain Redirect/rewrite

This was originally asked on stackoverflow, but looking around here, I get a comfy feeling someone will know the answer. I am using lighttpd and would like to have the url path for one page show as ...
0
votes
0answers
85 views

Server Migration Strategy Using URL Rewrite and Forwarding

I suspect this may not be possible for security reasons or something, but I must ask. I'm in charge of a migration project involving around 50 intranet applications. This process will take time and ...
1
vote
2answers
762 views

Redirect a url to another url in IIS 7.5

I have no idea why this isn't working. I've tried creating map rules and then rewritng and redirecting the url. I've tried just redirecting it with a simple rewrite rule and no matter what, the only ...
0
votes
1answer
727 views

Redirect 404 errors without rewriting the URL

Is it possible to have an erroneous URL remain in the address bar while redirecting the user to a URL within my domain? I want www.domain.com/forum to be the actual site being served in all 404 ...
1
vote
1answer
999 views

Nginx rewrite to eliminate “www” not working

I've looked at many SE threads and done various google searches and can't figure out why i can't redirect www.mysite.com to mysite.com on my nginx server. The 1st server block does the ...
3
votes
1answer
191 views

Trouble with www. redirect (.htaccess)

I'm trying to get a simple www. to non www. redirect set up. Here's the .htaccess DirectoryIndex index.php RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.org [NC] RewriteRule ^(.*)$ ...
1
vote
2answers
145 views

IIS7 page alias

I have a problem which I'm sure it's not really hard but I really don't know how to use the Windows IIS console. I have two static html pages (Lorem Ippsum pages) which I want to access when i access ...
1
vote
1answer
429 views

IIS rewrite rules skipped even though the pattern matches

Sorry for the vague title, the problem is too complex to summarize in a short phrase... I'm trying to set up the following redirection rules: blog.mydomain.net/en/something: redirected to ...
1
vote
1answer
277 views

IIRF on IIS 6 Rejects Server Connections

My clients have two sites (call them, say, mainsite and subsite) that are run as subscription services. They want clients to be able to access subsite only if they've got a paid subscription on their ...
0
votes
1answer
96 views

301 redirect (mod rewrite) a whole folder and all files with the get parameters

I want to redirect all urls starting with www.site.com/online/ to www.site.com some examples of the files I'm trying to redirect are ... ...
2
votes
2answers
693 views

Rewrite URL Domain Name when IP address used

My apache home server listens for HTTP requests on an alternate port (port 8080), but I would like to let users type my domain name (example.com) without having to specify the port. So far I've ...