Articles of 301 redirect

301redirect,需要删除文件名

我有很多redirect工作,但我有一个需要redirect,并删除文件名。 redirect 301 /path/to/file/default.aspx http://www.domain.com/newpath/to/page/ 当我实现它时,它会尝试redirect,但不会从URL中删除default.aspx。 编辑 重写规则: ## path relative to web root RewriteBase / ## workaround for HTTP authorization ## in CGI environment RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] ## always send 404 on missing files in these folders RewriteCond %{REQUEST_URI} !^/(media|skin|js)/ ## never rewrite for existing files, directories and links RewriteCond %{REQUEST_FILENAME} !-f RewriteCond […]

PortalAlias映射模式301redirect到IIS7上的DotNetNuke 5没有正确redirect页面

我有一个问题,通常是另一个人会解决,但他是在假期,我对DNN5和IIS7知之甚less。 我有一个客户的客户,要通过search引擎优化增加他们在谷歌的网页排名。 他们要求domainname.com.auredirect到www.domainname.com.au。 他们在DNN6上有1个门户,在DNN5上有2个门户。 我成功地获得了redirect到DNN6的工作,以便domainname.com.au/*redirect到www.domainname.com.au,但在DNN5上只有domainname.com.auredirect到www.domainname.com.au。 如果你要访问domainname.com.au/page.aspx它会抛出404错误。 两个实例都安装在同一个IIS上,所以我认为它必须与应用程序设置有关。 有谁知道什么设置可能会导致这个问题? 编辑:我已经尝试将其设置回无,这是默认设置,但它仍然redirect。

简单的301 RedirectMatch URLinputvariables不起作用

我有我的.htaccess中的这一行,301redirect不起作用。 它只是不redirect。 有人可以看到有什么不对吗? 请记住,我有我的.htaccess中的其他7个RedirectMatchstring,他们都工作正常。 我正在尝试redirect一个查询,如: mydomain.com/?start=4 至 mydomain.com/index.php?start=4 在我的.htaccess中使用这个 RedirectMatch 301 ^/?start=(.*)$ http://mydomain.com/index.php?start=$1

与IIS6编码为“%2D”的连字符

客户已经在服务器IIS6上build立了一个网站。 在旧版本的Firefox中,它们在包含连字符的URL中有问题。 当他们要求时 http://www.example.es/mas-info 他们得到一个301redirect到 http://www.example.es/mas%2Dinfo 连字符被replace为“%2D”代码,他们希望继续看到连字符。 我们给客户的明显答案是问题是通过升级到II7或使用更新版本的Firefox来解决的,但似乎这些选项对他们来说是不可能的。 存在任何其他方式来解决这个问题? 他们使用Firefox 20进行testing。 非常感谢你的帮助!

redirect404找不到链接,文件和目录

我必须永久redirect到12010个垃圾邮件主页。 有没有什么办法可以将404找不到的链接,文件和目录redirect到主页,而不会给出404错误头? 我尝试下面的Apache重写方法,但没有奏效。 <IfModule rewrite_module> Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-s RewriteRule .* index.php </IfModule> 我在使用cPanel的Apache web服务器上。 我也有根访问服务器。

301redirect到新的域名 – 旧地址仍会在分析中产生stream量

我使用.htaccess 301redirect将我的页面(包括www和非www)redirect到一个新的地址。 但是,我仍然看到Google Analytics(分析)中旧地址的一些动作。 有什么可以造成的?

301redirect自定义链接

我有几千这样的链接 /Gallery?cmd=viewCarGallery&carID=3747&pgID=1 现在我想redirect他们使用.htaccess到另一个网站的其他链接。 每一个链接将被redirect到它自己的目标链接。 我试过这样 Redirect 301 /Gallery?cmd=viewCarGallery&carID=3747&pgID=1 http://example.com/gallery/fcar_gallery 但不工作。 我已经在我的服务器启用mod_rewrite和oltherredirect工作完美。

添加一个URL后缀path(移动AMP),而不会在nginx中导致redirect循环

我正在使用nginx web服务器为我的wordpress网站。 我将使它成为移动服务的放大版本。 我想添加/放大/我的url。 我也使用漂亮的固定链接为我目前的url,所以我可以知道如何重写我的url在手机版/放大器/ 我正在使用重写^ http://example.com $ request_uri / amp / break; 但是当我服务networking时,它变成了这个 exmaple.com/homepage//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp//amp/ 我希望当iphone服务的网页,链接将是http://exmaple.com/homepage/amp/ 主要目的我只想添加/放大/网站的任何链接。 这是我的nginx.conf server { listen 80; server_name example.com; charset utf-8; access_log logs/xxx.access.log; root /var/www/html; index index.php; location / { try_files $uri $uri/ /index.php?q=$uri; } location /en { try_files $uri $uri/ /en/index.php?q=$uri; } location /my { try_files $uri $uri/ /my/index.php?q=$uri; […]

apache2configuration错误,将无限/index.html/附加到url

我使用安装了apache2和php7的Windows 10下的bash。 我为http:// localhost设置了一个虚拟主机映射到链接到物理窗口目录的符号文件。 当我打开url时,它无限地追加/index.html/到url,无论我input的是哪个子目录,无论url中有(现有)文件,如下所示: http://localhost/pub/videos/viewsSimilarities_movie.mp4 导致: http://localhost/pub/videos/viewsSimilarities_movie.mp4/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/ 和 http://localhost/pub/ 导致: http://localhost/pub/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/index.html/ 我的/etc/apache2/sites-available/localhost.conf: <VirtualHost *:80> ServerName localhost DocumentRoot /var/www/html DirectoryIndex index.html <Directory /var/www/html> # Options +Indexes +FollowSymLinks +MultiViews AllowOverride None Order allow,deny allow from all RewriteEngine Off </Directory> ErrorLog /var/log/apache2/localhost_error.log LogLevel debug CustomLog /var/log/apache2/localhost_access.log combined # phpMyAdmin default Apache configuration Alias /phpmyadmin /var/www/phpmyadmin <Directory /var/www/phpmyadmin> […]

HTTP / 1.1 301从IIS永久移动两分钟

两分钟的IIS从www.exaple.comredirect到www.example.com 。 没人修理它 – 这是一个暂时的错误。 有一个网站重写2.0安装有一个规则是多年没有改变,一切都很好,直到上周一。 两分钟后有一个redirect循环,网站被closures了。 HTTP/1.1 301 Moved Permanently Content-Type : text/html; charset=UTF-8 Location : http://www.exaple.com/ Server : Microsoft-IIS/8.5 X-UA-Compatible : IE=edge,chrome=1 Date : Sun, 25 Sep 2016 23:15:11 GMT Content-Length : 142 事件日志是清楚的 – 没有.NET,APS,系统。 你以前遇到过这样的事情吗? 可能是什么原因?