Articles of redirect

使用IPFW将端口80请求redirect到本地Web服务器

我build立了一个freebsd路由器,并且希望我的networking上的某些IP被转发到我们的本地networking服务器,如果他们发出80端口请求的话。 一个例子是被禁止的用户试图上网,但是他的所有请求都被转发到通知他被禁止的网页。 据我所知,我可以使用IPFW,也可以使用NATD。 如果有人能告诉我如何做到这一点,我将不胜感激。

在打印服务器2008 R2上消除重复的打印机

我在新的2008 R2服务器上添加了一个打印服务器angular色,并开始向其添加打印机,以供远程桌面会话使用。 当我添加了远程桌面服务angular色时,我指定了打印机redirect,认为这将是一件好事。 在我testing所有这些的PC上,我在本地添加了networking打印机,以便打印机可以在本地使用。 当我login到2008 R2服务器时,我注意到我添加的打印机在那里有两次…一次在2008 R2服务器上,另一次从我的电脑redirect。 有没有办法消除这种重复w / o消除redirect?

Apache反向代理服务错误的内容

我在一个HTTP守护进程前面有一个Apache Proxy设置,它为Sinatra Web应用程序提供下列指令(这很好用) ProxyPass / http://ip-ad-dr-ess:8080/ ProxyPassReverse / http://ip-ad-dr-ess:8080/ 这使我可以浏览http://example.com,并从守护程序Web服务器提供内容。 我想包括一个wordpress博客作为主站点的子目录。 http://example.com <- Sinatra http://example.com/blog <- WordPress 这是整个configuration部分 <IfModule mod_proxy_http.c> LogLevel debug ProxyRequests Off ProxyPass /blog http://blog.example.com:80/ ProxyPassReverse /blog http://blog.example.com:80/ ProxyPass / http://ip-ad-dr-ess:8080/ ProxyPassReverse / http://ip-ad-dr-ess:8080/ <Location /> RequestHeader set X-Forwarded-Protocol http </Location> <Location /blog> RequestHeader set X-Forwarded-Protocol http </Location> ProxyPreserveHost on ProxyErrorOverride Off </IfModule> […]

颠倒.htaccessredirect规则

让我以身作则。 说,我在我的.htaccess文件中有这个redirect规则: RedirectMatch 301 ^/([^/]+)/([^/]+)/$ http://www.example.com/$2 它基本上是把http://www.mysite.com/sports/test-post/redirect到http://www.mysite.com/test-post/ 。 现在,我该如何修改.htaccess规则来做相反的事情呢? (即将http://www.mysite.com/sports/test-post/redirect到http://www.mysite.com/sports/test-post/ )

子域redirect到文件

这是我的htaccess: RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+?)\.imvu-e\.com$ RewriteCond /var/imvu/products/ht/clients/%1/ -d RewriteRule ^(.+) %{HTTP_HOST}$1 RewriteRule ^(?:www\.)?([^.]+?)\.imvu-e\.com/(.*) /var/www/imvu/products/ht/clients/$1/$2 [L] 我想要 anything.imvu-e.comredirect到/var/imvu/products/ht/clients/anything/ 因此http://anything.imvu-e.com/woot.php?var=4转到/var/imvu/products/ht/clients/anything/woot.php发送它var=4 现在访问它的方式是http://www.imvu-e.com/products/ht/clients/anything/woot.php?var=4

检测本地化的TLD

我有许多顶级域名(TLD)用于我的域名,美国用户名为.COM,德国用户名称是.DE等。我使用CNAMElogging将他们全部redirect到.COM域名。 原因是为了防止从Google处罚重复的内容。 有没有办法检测用户input的TLD,所以我可以用正确的语言显示页面?

lighttpdredirect某些链接到某些url

有人能告诉我如何/为什么这个redirect不起作用? $HTTP["host"] =~ ".*\\.mydomain\\.com" { url.redirect = ( "/index\.php\?pg=mysql" => "http://mydomain.com/lean-webhosting/mysql-clustering/", "/index\.php\?pg=cloud_uitleg" => "http://mydomain.com/lean-webhosting/cloud-uitleg/" ) } 有人有任何想法? 谢谢!

HTTPS在nginx中redirect

我正在尝试将所有HTTP通信redirect到HTTPS。 我使用的Web服务器是nginx。 这是我用来做redirect的服务器块。 server { listen 80; rewrite ^ https://$server_name$request_uri? permanent; } 这成功地将URLredirect到http://localhost到https://localhost 。 但是,对于像http://localhost/table/这样的URL,我将redirect到https://table ,这是不正确的。 我希望它重新指向https://localhost/table/ 任何帮助将非常感激。 更新:似乎重写scheme有一个跟踪斜线问题。 例如, http://localhost/table被正确redirect,但http://localhost/table/不是。

IIS 7.5 SSLredirect

我有一个标准网站托pipe在我完全控制的服务器上 – www.domain.com。 我最近为这个域名购买了一个SSL证书,准备接受信用卡,并且希望将所有请求redirect到https://www.domain.com 。 在大多数情况下,我创build的规则(见下文)工作正常 – 如果我inputhttp://www.domain.com它将redirect到https://www.domain.com 。 我遇到的问题是,如果我去一个内部链接,如http://www.domain.com/folder/page.aspx ,我得到一个404,因为唯一的绑定绑定到HTTPS。 我怎样才能做一个redirect规则,说任何请求www.domain.com发送到HTTPS,但保留原来的文件夹/页面结构的要求? 所以,去http://www.domain.com/folder/page.aspx发送到https://www.domain.com/folder/page.aspx 。 我宁愿如果查询string值也保持不变。 这是我目前的重写规则: <rewrite> <rules> <rule name="Redirect to HTTPS" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" /> </rule> </rules> </rewrite>

简单的NGinx重写就是redirect

我试图为我的Nginx服务器上运行的网站设置一个友好的URL,但由于某种原因,url正在被redirect,而不是被重写。 例如,如果用户访问mydomain.com/aboutme/我想mydomain.com/aboutme/留在地址栏中,但要从mydomain.com/aboutme.php 在我的Nginx站点configuration中,我有以下几个(简单的例子,为了简单起见,一些东西被砍掉): server { listen 1.2.3.4:80; server_name www.mydomain.com; location / { rewrite ^/aboutus/$ http://www.mydomain.com/aboutus.php permanent; } } 不pipe出于什么原因,Nginx似乎坚持将友好的urlredirect到php文件,但是我想要一个更传统的“重写”(就像我之前在Apache mod_rewrite中所做的一样)。 我可能做错了什么,但是如果我能弄清楚什么的话,我会被诅咒的。