2017-08-08 122 views
2

我目前在我的網站上使用非描述性文件名的圖像,如kejr09238u30sdkfh.jpg。我會將這些圖像重命名爲類似descriptive-file-name.jpg的搜索引擎優化原因。 目前有6張圖片改名。.htaccess 301將圖像從舊圖像重定向到新圖像

如何寫301重定向?

例如

mysite.com/images/123.jpg更名爲mysite.com/images/abc.jpg

你們能幫助我嗎?

回答

2

使用簡單redirect命令:

# Redirect old file path to new file path 
Redirect 301 /images/123.jpg http://example.com/images/abc.jpg 
+1

其工作..感謝.. –