Articles of redirect

.htaccess将URL重写为域中的大写字符

例如,我想要foob​​ar.com显示FooBar.com 这几乎工作,但结束了强制redirect循环: RewriteEngine On RewriteCond %{HTTP_HOST} ^(www.)?foobar.com\.com RewriteRule ^(.*)$ http://FooBar.com/$1 [L,R=301] 有没有办法做到这一点? 我知道这很奇怪,但我只是好奇,如果有可能没有结束在一个循环。

代理端口80到443与Netcat / NC

我有一个Windows服务器通过Cygwin 32位通过Thin ruby​​ gem web服务器运行Rails应用程序。 服务器只侦听端口443,并使用HTTPS,因为它使用的是LDAP身份validation,而且我不想在电话上使用纯文本密码。 我想有一个超级简单,宕机和肮脏的代理redirecthttp到https。 这可以通过NC或其他cygwin工具来实现,而无需安装类似squid或apache的东西?

RDS服务器Windows Server 2008需要立即漫游configuration文件/文件夹redirect文件保存

我在2008 R2 RDS服务器场环境中使用GPO部署的附加文件夹redirect设置了漫游configuration文件。 它们运行良好,但是添加到configuration文件中文件夹位置的文件(例如将文件保存到桌面)仅在注销时复制到redirect的位置。 有什么办法可以设置这个,所以文件立即保存到networking位置,而用户在注销之前工作? 我担心的是,如果发生服务器崩溃,用户可能会丢失数小时的工作数据。 在此先感谢,任何相关的信息将得到一个投票。

如何在第二台主机上的一台主机上configuration其他域服务的DNS?

我想要实现以下内容: mydomain.com/webmail,mydomain.com/forums,mail.mydomain.com等指向当前主机A 我希望将mydomain.com指向一个新的网站主机: www.mydomain.com,mydomain.com指向主机B上的网站,但只有这些url是这样做的。 电子邮件很简单,为mail.mydomain.com添加一个新的MXlogging,为mail.mydomain.com添加一个指向邮件服务器IP的logging。 但是,我不能简单地为mydomain.com添加一个Alogging来指向主机B,因为那么子主目录(如mydomain.com/forums)将不再可以在主机A上访问到。 有没有解决这个问题,不需要更改最终用户?

Nginx – WordPressredirect循环

我使用nginx作为apache2的前端。 Apache2将处理所有dynamic内容。 这是我的主要文件,nginx作为apache的前端,并将所有dynamic页面转发到apache2: server { listen 80; root /var/www/websites/main/htdocs; index index.html index.php index.htm; server_name *removed*; location / { try_files $uri $uri/ /index.php; } location ~ \.php$ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:81; } location ~ /\.ht { deny all; } } 不幸的是,这会导致redirect循环。 当我使用下面的configuration时,网站加载正常,虽然nginx正在处理所有静态和dynamic内容,这是违背这一点。 server { listen 80; root /var/www/websites/main/htdocs; […]

当在大多数浏览器的链接中点击链接时,URL会生成一个302redirect – 但是在input时会返回200

我正在Joomla上build立一个小型网站,遇到一个奇怪的redirect问题。 我想在我的网站中包含一个链接到一个设置在不同服务器上的论坛。 当我在浏览器中键入或复制/粘贴论坛url时,它完美地工作: http : //www.techcomputerworld.com/almeriarocketry/ 这是请求/回应: Request URL:http://www.techcomputerworld.com/almeriarocketry/ Request Method:GET Status Code:200 OK Request Headersview source Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Cache-Control:max-age=0 Connection:keep-alive Cookie:phpbb3_gu83i_u=1; phpbb3_gu83i_k=; phpbb3_gu83i_sid=5d7245ace142f186e3049d7666c528d7; __utma=214190226.1703438907.1378288831.1378288831.1378288831.1; __utmb=214190226.1.10.1378288831; __utmc=214190226; __utmz=214190226.1378288831.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style_cookie=null Host:www.techcomputerworld.com User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 Response Headersview source Cache-Control:private, no-cache="set-cookie" Connection:Keep-Alive Content-Encoding:gzip Content-Length:3805 Content-Type:text/html; charset=UTF-8 Date:Wed, […]

Ngnix重写 – 如果URL包含

我有一个小问题 – 我的错误日志填满了我的网站上的目录文件夹的请求(但添加的数据不应该在那里)。 http://example.com/the-directory/undefined http://example.com/the-directory/administrator http://example.com/the-directory/admin http://example.com/the-directory/script 如何设置重写,以便包含以下内容的任何请求: /the-directory/{any extra data} 301redirect到 /the-directory/ 我所尝试的是: rewrite ^/the-directory/(.*)$ /the-directory/ last; 但是,这只是陷入redirect循环。 任何帮助将不胜感激。

用HAProxy处理404

我有一堆通过HAProxy传递给Resin集群的域。 这个想法是,当我收到一个404,因为一个不存在的子域,我想redirect到现有的页面,如下所示: test123是一个不存在的子域,所以如果我提出请求http://test123.mydomain.com/rents-house-near-the-lake.html我想redirect到http://www.mydomain.com /rents-house-near-the-lake.html (www是一个现有的子域名) 这将是可能的? 谢谢!!

Apache HTTPS从旧域redirect到新的HTTPS域

我曾经有一个曾经有一个SSL证书的域,它仍然有。 但是我已经更改了域名,并且我还为该新域名创build了一个新的SSL证书。 我仍然有用户通过https://shabbasheep.myolddomain.com访问该网站,它给了我This is probably not the site that you are looking for! 但是,当他们通过shabbasheep.myolddomain.com访问该网站时,它将它们正确地redirect到shabbasheep.mynewdomain.info 这里是我的apache条目的样子,从这里得到了一个想法 <VirtualHost *:80> ServerName shabbasheep.myolddomain.com RewriteEngine On RewriteCond %{HTTP_HOST} shabbasheep.myolddomain.com$ RewriteRule ^(/(.*))?$ https://shabbasheep.mynewdomain.info$1 [L,NC,R=301] </VirtualHost> 我的SSL <VirtualHost *:443> ServerName shabbasheep.mynewdomain.info ServerAlias www.mynewdomain.info RewriteEngine On RewriteCond %{HTTP_HOST} shabbasheep.myolddomain.com$ RewriteRule ^(/(.*))?$ https://shabbasheep.mynewdomain.info$1 [L,NC,R=301] SSLEngine on SSLCertificateFile "mypathto.crt" SSLCertificateKeyFile "mypathto.pem" SSLCACertificateFile "mypathto.crt" … … […]

301在同一托pipe服务器上redirect

我最初买了一个托pipe软件包的域名http://example.com ,并运行了一段时间的博客。 现在我已经买了一个域名http://example.com.au添加并重复的内容,但现在想写一个301redirect。 由于新域名是原始服务器的插件,它共享.htaccess文件,我实现的一般301redirect导致无限redirect循环。 什么是正确的方法来做到这一点? 我试图按照这里发布的早期post上的指示。 基本上插入这个: Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www.example.com [NC] RewriteRule (.*) http://www.example.com.au/$1 [R=301,L]