Articles of redirect

虚拟主机中的一个特定的子域不redirect,但是其他的成功

我喜欢我的网站可以通过example.org或https://example.org而不是www.example.org 。 所以我希望http://www.example.orgredirect到http://example.org和http://www.example.org到https://example.org 。 但有趣的事情发生: https://www.example.orgredirect到https://example.org 而不是http://www.example.org到http://example.org 我的main.conf: <VirtualHost *:80> ServerName example.org ServerAdmin webmaster@localhost DocumentRoot "/var/www/html" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> <VirtualHost *:443> ServerName example.org ServerAdmin webmaster@localhost DocumentRoot "/var/www/html" ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLCertificateFile /pathtocert.pem SSLCertificateKeyFile /pathtokey.pem </VirtualHost> <Directory "/var/www/html"> Options FollowSymlinks ExecCGI AllowOverride None Require all granted </Directory> 我的www.conf: <VirtualHost *:80> ServerName […]

nginxredirect/代理,一个域(url)与两个IP的

我们要为其中一个Java应用程序设置故障转移机制,应用程序在一台服务器上有3个实例,每个实例必须通过不同的URL访问,这些URL已经注册,并可以通过dns访问。 在辅助服务器上,我们做复制(重要的部分是,实例可以启动,只能在一台物理机上运行),因此我们build立了辅助服务器,如果主要出现故障,我们想为一个域注册多个IP,但由于应用程序旨在只有一个IP注册到实例url。 多个IP设置的另一个问题是dns的循环性质。 是否有可能为一个域注册两个IP,并通过nginx或HAproxy将其代理指向只有主服务器? 还是其他一些想法? 我的想法是,如果主要出现故障,请打开辅助服务器上的应用程序,并尽可能在nginx上更改configuration,以避免dns注册和传播时间?

根上的RedirectMatch查询string

我正在尝试configurationredirect: 我只想将www.website.com的根页面发送到www.website.com/?lang=id 但是,如果我使用下面它将卡住在一个无限循环,因为我没有检查匹配条件的查询string值: RedirectMatch ^/$ /?lang=id 我该怎么做呢?

AWS中的基于位置的URLredirect

我将如何处理做一个URLredirect,具有以下作用: 网站:example.com 如果用户来自印度的IP地址:example.com – > india.example.com

HaProxy别名域

我有几个领域是我的主要领域的变化。 我想将它们全部redirect到我的主域,忽略协议(http / https)和子域(www./beta。)。 有没有办法做到这一点在HAProxyconfiguration? 我正在想着类似的东西 redirect prefix https://*.domainA.com code 301 if { hdr(host) -i *.domainB.com } redirect prefix https://*.domainA.com code 301 if { hdr(host) -i *.domainC.org }

Django + NGINX httpsredirect(414请求URI过大)

我试图解决nginxredirect到https,但是当我使用www.ozkandurakoglu.com我得到414请求 – URI太大的错误。 这是我对nginx的设置: upstream ozkan_server { server unix:/home/ytsejam/public_html/ozkansimple/run/gunicorn.sock fail_timeout=10s; } server { listen 80; server_name ozkandurakoglu.com www.ozkandurakoglu.com; return 301 $scheme:https://ozkandurakoglu.com$request_uri; } server { listen 443 ssl; listen [::]:443 ssl; ssl on; ssl_certificate /etc/letsencrypt/live/ozkandurakoglu.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/ozkandurakoglu.com/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/ozkandurakoglu.com/chain.pem; ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; ssl_prefer_server_ciphers on; add_header Strict-Transport-Security max-age=15768000; ssl_stapling on; ssl_stapling_verify on; server_name www.ozkandurakoglu.com; […]

HTTPredirect与URL重写(IIS)

在IIS菜单中,您有HTTPredirect和URL重写。 后者则有一个重写动作和一个redirect动作。 我想知道这些之间有什么区别。

Apache conf或.htaccess规则将404redirect到某个文件types的另一个位置

我使用颠覆,并不想检查超过1 GB的图像到每个开发人员的桌面上,所以我怎么能有一个中央图像服务器,并有Apache推404的只是从* .jpg例如到这个其他的服务器

将所有(未被拒绝的)垃圾邮件redirect到sa-exim中的特殊邮箱

我希望将所有垃圾邮件(不是完全拒绝)redirect到本地用户spam邮箱(即将spam传递给spam用户而不是原始本地收件人)。 我在Debian上使用sa-exim (exim 4 + spamassasin 3.2)(它有自己的exim4.conf.template复杂configuration)。 我试过添加下面的路由器(在exim的real_local之前): spams: debug_print = "R: spams $local_part@$domain" driver = redirect condition = ${if def:h_X-Spam-Flag {1}{0}} allow_fail allow_defer check_local_user domains = +local_domains data = spam@localhost 但似乎并没有被触发。

如何创build一个虚拟目录以redirect到IIS中的另一个虚拟目录

我对IIS还是个新手,我想要做的是按版本号为每个版本的软件创build多个虚拟目录,以便我们可以对每个configuration进行回归testing。 所以我想要做的是这样的: app_1.2.3.4作为虚拟目录。 然后有一个虚拟目录“应用程序”redirect到我设置的值,例如app_1.0.0.0。 这是可能从IIS,或者我需要一些神奇的asp.net或JavaScript做同样的事情?