Articles of redirect

Nginx将路由redirect到子域

我试图从Nginxredirect15个不同的路线从文件夹到子域(我已经阅读了一些线程)。 我很困惑,因为这个redirect正在工作: rewrite ^/admin(.*) $scheme://admin.example.com/$1 301; 而这一个不(在我的浏览器中没有更改的url): rewrite ^/app(.*) $scheme://apps.example.com/$1 301; 我错过了什么 ? 那时候,我只有这两个redirect(我以后需要15个更复杂的东西)。 编辑 :更多的解释与我的完整的nginxconfiguration server { listen 80 default_server; listen [::]:80 default_server; server_name example.com; passenger_enabled on; rails_env production; root /home/admin/rails/current/public; # redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } […]

nginx:将没有子域名的httpsstream量redirect到子域名(非www到www)

我目前的SSL证书覆盖了子域名www.example.com和static.example.com 因此,如果用户尝试通过https://example.com访问我的网站,我想将他redirect到https://www.example.com 。 我如何在我的nginx conf中做到这一点? 我知道这里有类似的问题,但我在这里找不到解决scheme。

HTTP和HTTPS Apacheredirect到内部IP虚拟机

这是我的基本设置: 路由器转发端口的80和443运行Apache的Ubuntu服务器14.04。 很好用。 在Ubuntu服务器上运行多个虚拟机(QEMU / KVM)。 虚拟机处于桥接模式,所以它们有自己的内部IP地址。 我想将子域的所有stream量redirect到VM的处理。 例如: sub1.example.com – > VM1 sub2.example.com – > VM2 sub3.example.com – > VM3 我想这个转发SSL请求到虚拟机进行处理。 目前我得到redirect循环或SSL错误,无论我尝试。 我可以得到非SSL的工作,但我不知道如何设置Ubuntu服务器来处理和转发HTTP和HTTPS的请求。 编辑: 这是我目前的虚拟主机文件: <VirtualHost *:80> ServerName sub1.example.com ProxyPreserveHost On ProxyPass / http://192.168.1.78/ ProxyPassReverse / http://192.168.1.78/ </VirtualHost> <VirtualHost *:443> ServerName sub1.exmaple.com ProxyPreserveHost On ProxyPass / http://192.168.1.78/ ProxyPassReverse / http://192.168.1.78/ </VirtualHost> 我知道这是不正确的,但不知道该怎么做。 主服务器将收到来自http://sub1.example.com和https://sub1.example.com的请求 编辑2: […]

Haproxyredirect到不同的子域

我正在尝试使用haproxy将一个urlexample.com/blogredirect到blog.example.com。 我已经应用了以下规则: acl blog_path path_beg -i /blog/ redirect location http://blog.example.com/ code 301 if blog_path redirect工作正常,但有一个我不能解决的小故障。 如果我在浏览器中inputexample.com/blog/ ,它将被成功redirect到blog.example.com,但是如果我inputexample.com/blog 而不是/最后它会被redirect到blog.example.com/blog不会发生,对我来说很奇怪。 任何想法如何解决这个问题。

Apache将一些urlredirect到主页

我试图实现一个简单的重写,但看起来像我做错了什么。 我想要做的是,我有一个urlblog.example.com/articles/这给了我404,和其他url是blog.example.com/articles/abc,blog.example.com/articles/xyz等,这工作得很好,所以我想blog.example.com/articles/向我展示的主页是blog.example.com而不是404,但我不想要任何其他的url,其中有像/ articles / *受该规则的影响。 这是我迄今为止所尝试过的 RewriteRule ^/articles$ /index.php [R=302] 这不起作用 我也尝试了redirect Redirect "/articles" "http://blog.example.com/" 我工作,但它会更改浏览器中的url,也会影响以/ articles开头的所有其他url 任何帮助表示赞赏

西里尔文URL的HTTPredirect:这个例子没有被编码的​​URL。 为什么?

根据https://tools.ietf.org/html/rfc5987 ,应使用ISO-8859-1字符编码返回HTTP头字段。 这也适用于用于redirect的位置字段。 然而,看下面的例子,我不知道如何redirect工作,尽pipeURL不编码。 http://goo.gl/m5fDF0 我运行了不同的工具,包括谷歌浏览器开发人员,位置字段绝对是编码,但使用CURL或Screaming Frog等软件返回用西里尔文字符写的位置。 理论上redirect应该在404中解决,但是我得到了200。 任何想法如何这是可能的?

Nginx将端口redirect到url

我正在运行安装了VestaCP的VPS。 Web面板在端口8083上运行。 我已经设法得到它在panel.domain.com工作,但是,面板中的一些URL在使用子域时会失去function。 我想知道如何让端口8083指向domain.com/panel 。 这是我在我的nginxconfiguration中尝试过的: server { listen 108.xx.xx.xxx:443; server_name domain.com; root /var/www/ghost; index index.html index.htm; location /panel { proxy_pass https://127.0.0.1:8083; } }

.htaccess 301redirect不起作用

我有一个使用基于PHP的CMS系统的网站。 所以每个页面都是dynamic生成的,就像这样: http://www.shuling.net.cn/index.php?_m=mod_product&_a=view&p_id=87 现在我想redirect这个特定的页面到另一个页面,即: https://www.datanumen.com/sql-recovery/ 所以我写的.htaccess文件如下: redirect 301 /index.php?_m=mod_product&_a=view&p_id=87 https://www.datanumen.com/sql-recovery/ 但是,当我将.htaccess上传到网站的根目录后,这根本不起作用。 我通过编写另一条规则来重新testing,如下所示: redirect 301 /sql/ https://www.datanumen.com/sql-recovery/ 那么这个规则将完美的工作。 为什么? 谢谢

Apache2将wwwredirect到非www(使用SSL)

聪明的人, 我正在努力完成以下内容: redirect这些: http://www.veluwsvuurbarneveld.nl http://veluwsvuurbarneveld.nl https://www.veluwsvuurbarneveld.nl 至 https://veluwsvuurbarneveld.nl 目标是将所有相关的URL发送到非www的SSL地址。 这是mij apache2 config中的代码(指向SSL密钥的行删除): <VirtualHost *:443> ServerName veluwsvuurbarneveld.nl DocumentRoot /var/www/ SSLEngine on SSLCertificateFile /etc/ssl/certs/… SSLCertificateKeyFile /etc/ssl/private/… SSLCACertificateFile /etc/ssl/certs/… </VirtualHost> <VirtualHost *:80> ServerName www.veluwsvuurbarneveld.nl Redirect permanent / https://veluwsvuurbarneveld.nl/ </VirtualHost> <VirtualHost *:80> ServerName veluwsvuurbarneveld.nl Redirect permanent / https://veluwsvuurbarneveld.nl/ </VirtualHost> <VirtualHost *:443> ServerName www.veluwsvuurbarneveld.nl Redirect permanent / https://veluwsvuurbarneveld.nl/ </VirtualHost> <Directory […]

OpenVPN:如何为一个客户端redirectstream量?

我的Tomato路由器上configuration了OpenVPN服务器,并且我有Direct客户端redirectInternet通信选项被禁用,因为默认情况下,我不希望我的通信redirect通过我的家庭Internet连接。 但在某些情况下 – 比如免费的无线热点 – 我希望所有的stream量都被redirect。 我可以configuration一个特定的客户端.ovpn文件redirect我的所有stream量和另一个不redirect? 或者这是一个完全服务器端的configuration?