Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 重定向301 htaccess文件大写字母和空格_Apache_.htaccess_Redirect_Mod Rewrite_Seo - Fatal编程技术网

Apache 重定向301 htaccess文件大写字母和空格

Apache 重定向301 htaccess文件大写字母和空格,apache,.htaccess,redirect,mod-rewrite,seo,Apache,.htaccess,Redirect,Mod Rewrite,Seo,我有一个问题301重定向从旧到新的页面。问题是旧目录有空格和大写字母,而谷歌给了我一个错误。我举了一个例子: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Redirect 301 https://carretonselevadors.com/Carretons%20Elevadors%20Castellano/index.php

我有一个问题301重定向从旧到新的页面。问题是旧目录有空格和大写字母,而谷歌给了我一个错误。我举了一个例子:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Redirect 301 https://carretonselevadors.com/Carretons%20Elevadors%20Castellano/index.php https://carretonselevadors.com/quienes-somos.php

现在您可以通过C面板修复重定向问题。 首先,你必须进入C面板登录, 第二步单击重定向 选择301进行永久重定向
301:从旧Ulr到新Url

基于您所展示的示例,请尝试以下内容。你需要为你的规则使用NE标志来考虑字符作为他们的实际意义。另外,请确保在测试URL之前清除浏览器缓存

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

是https://carretonselevadors.com/Carretons Elevators Castellano/index.php您的源URL?@Robert,您可以看到此链接,祝您学习愉快。