Tagged Questions
1
vote
2answers
52 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
41 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
74 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
219 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
174 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 ...
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
195 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
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
0answers
67 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
301 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
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
2answers
35 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
109 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
88 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
22 views
Rewrite a URL with a Real Directory In It?
I have a directory on my server:
http://mydomain.com/simfiles
I want an htaccess rewrite rule that will take a url that looks like
http://mydomain.com/simfiles/somedir1/somedir2
Where those are ...
0
votes
0answers
57 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
279 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
422 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
482 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
149 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
120 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
203 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
211 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
74 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
368 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 ...
0
votes
1answer
73 views
Redirect a url to a new host
I have the following URL which displays a normal static website: www.example.com. This site is hoted on Amazon.
I want to make all urls starting with www.example.com/redirect to redirect to another ...
0
votes
1answer
389 views
(Probably) Simple mod_rewrite - remapping my site's URLs
This problem is driving me nuts. I've tried reading loads of tutorials about how to use mod_rewrite but I just can't get my head around it.
These questions must get asked all the time, so apologies ...
2
votes
1answer
623 views
htaccess: how to rewrite to clean urls and redirect old urls to the new clean ones?
With htaccess I'm trying to make my sites urls clean.
I use very basic urls like: www.mysite.com/pagename.php ("pagename" is variable).
I want www.mysite.com/pagename to display the content of ...
0
votes
1answer
1k views
URL Rewrite in IIS 7.5 not working
I am trying to redirect all http traffic to https as the site requires SSL.
For example, if someone navigates to http://site.com or http://www.site.com I want to redirect the user to ...
4
votes
1answer
1k views
nginx: rewrite all except one location
Right now my nginx is rewriting several domains to one main domain which we are using. Here's one rule from my config:
server {
listen X.X.X.X:80;
server_name .exampleblog.org;
rewrite ^(.*) ...
2
votes
2answers
115 views
.htaccess 301 redirect PLUS url rewrite
Premise:
My photography website is www.domain.com and my blog is on www.domain.com/blog.
Everything is on self hosted wordpress platform.
On my index page I have my photo galleries.
I now would ...
0
votes
2answers
77 views
Removing string from URL with Apache2 server
This should be simple and I've looked at a number of existing questions but I still can't fix my problem. I guess I just can't wrap my head around how RewriteRule and RedirectMatch work.
I get a ...
1
vote
3answers
500 views
How to redirect requests to a different domain/url with nginx
I'm trying to redirect all users coming to a URL "http://example.com/something" to a URL like "http://answares.com/examples_com/something".
I'm trying with code like this:
server {
listen ...
1
vote
1answer
307 views
Apache subdomain redirect with subdomain representing parameter in URL
I am looking at updating my htaccess file to control a subdomain being created. I am having issues with a few things.
Firstly I am setting up the domain where http://m.domain.com/ and that is ...
2
votes
2answers
642 views
A simple way to redirect http://example.com to http://example.com/mylink with Apache?
Just starting to try to get the hang of how all the directives and options work under Apache.
I'd like to do a redirect with my one site (only running one site on the server) so that when a request ...
1
vote
3answers
457 views
How do I redirect an entire address in IIS7 URL Rewrite
My company has a promotion in a magazine that was created before we implemented our new site. Since the release of the new site we use a inbound rewrite rule to redirect anything with a www. This ...
0
votes
1answer
197 views
Does IIS support redirecting a specific URL to a list of alternate locations/mirrors?
I'm running IIS7.5 running a website for a software application. The application supports automatic updates so when I release a new version, the server gets pounded with download requests from the ...
3
votes
2answers
3k views
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 ...
0
votes
1answer
627 views
How to HTTP Redirect while maintaining subdomain using IIS 7
My question is similar to
Redirect subdomain to subdomain on new domain except I'm using IIS 7. The application is ASP.NET framework 2.0.
I have a url cust1.olddomain.com and I need to redirect to ...
3
votes
2answers
234 views
URL Rewrite is adding HTTPS to my canonical redirects in IIS7
I have the following rule defined in my Web.config:
<rule name="Enforce canonical hostname" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add ...
0
votes
2answers
105 views
url rewrite / redirect apache server
How would I get sub.domain.com OR http://sub.domain.com
to do a redirect to https://sub.domain.com
Thanks!
2
votes
1answer
980 views
Lighttpd: redirect any request to index.html
I'm trying to send any request to the index.html with lighttpd in order to prevent 404 but I'm not smart enough because either the redirect matches itself or, for calls to subdirs, although the ...
0
votes
1answer
62 views
implement domain mapping
I am working on a site which can have user portfolios.
The url we want to use is abc.mysite.com.
We want to give users to be able to purchase a domain name from us (we can integrate our system ...
1
vote
3answers
2k views
IIS URL Rewrite HTTP to HTTPS with Port
My website has two bindings: 1000 and 1443 (port 80/443 are in use by another website on the same IIS instance). Port 1000 is HTTP, port 1443 is HTTPS. What I want to do is redirect any incoming ...
4
votes
1answer
215 views
How to redirect elgantly many redirects in htaccess?
Q1. is it possible to further optimize / compact the following rules, thereby making the entire redirections faster and easier to maintain in future? There are about twenty of these domains!! you get ...
0
votes
2answers
1k views
nginx redirect rewrite not working, www to non www
Rewriting www to non-www is not working.
The domain.com URL works but www.domain.com gives the following error "Problem loading page - Mozilla Firefox - Server not found". I've cleared FF Cache, ...
0
votes
1answer
438 views
How to rewrite from /page to /xx/page, using htaccess & apache only?
Visualise a three step jump sporting event, with the first two steps perfect in place and the third step launching into air, never coming back and eventually a crash! That is what this question boils ...
0
votes
1answer
221 views
Redirection via mod-rewrite, using apache htaccess only
Hey All, a question about mod-rewrite. When user inputs /somepage?ln=xx my server loads invisibly /xx/somepage which is much a beautiful url.
BUT, those ugly pages still reappear cached and i just ...
0
votes
1answer
316 views
Apache Rewrite or Redirect?
I want to redirect a http://site.com/ to http://site.com/url. What is the simplest way to do this?
I tried editing httpd.conf and to the redirect command. It didn't worked.
Also I tried creating a ...
1
vote
1answer
994 views
Apache 2.2 rewrite - Force all requests to index.html
I need to force all requests regardless of what they are to index.html. Unfortunately everything I have tried has not worked properly.
The following seems to me like it should work but it doesn't. My ...
