2017-10-22 7 views
0

を働いていないとリダイレクト:.htaccessファイルは、私はこのようなリンクを持っているスペース%20が

http://www.expamle.com/folder1/folder2/folder%20/file.html 

私は301にしたいへの.htaccessでそれをリダイレクト:

http://www.expamle.com/folder1/folder2/folder/file.html 

私はこれを試してみました

RewriteCond %{REQUEST_URI} ^\/folder1\/folder2\/folder\%20\/file\.html$ 
RewriteRule .* http://www.example.com/folder1/folder2/folder/file.html [R=301,L] 

が、私は取得しています:

Not Found 

The requested URL /folder1/folder2/folder /file.html was not found on this server. 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. 

また、私はこの

Redirect 301 /folder1/folder2/folder%20/Export1.htm http://www.example.com/folder1/folder2/folder/file.html 

を試してみましたが、同じエラーを得ました。

私は間違っていますか?

答えて

0

ソリューションは、次のように引用符を追加することです:

Redirect 301 "/folder1/folder2/folder /Export1.htm" http://www.example.com/folder1/folder2/folder/file.html 
関連する問題