0
我有以下代碼爲我.htaccess
文件:找不到網頁錯誤與301永久重定向
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# Redirect Old Page to New Page
Redirect 301 /2012/03/18/ajax-based-instant-image-upload.html http://domainname.com/blog/jquery/ajax-based-instant-image-upload/
Header unset ETag
FileETag None
<filesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, private"
Header set Expires "Sun, 23 October 2011 20:00:00 GMT"
</filesMatch>
<filesMatch "\.(css|css.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\.(js|js.gz)$">
Header set Cache-Control "max-age=604800, private"
</filesMatch>
<filesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=216000, private, must-revalidate"
</filesMatch>
<filesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, private, must-revalidate"
</filesMatch>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
但是當我來到通過谷歌搜索這篇文章,然後我得到的PAGE NOT FOUND
錯誤。我測試了這個代碼在我的本地主機工作文件,但沒有在真正的服務器上任何人都可以告訴我確切的問題在哪裏?
重定向301 /2012/03/18/ajax-based-instant-image-upload.html http://domainname.com/blog/jquery/ajax -based-instant-image-upload/ – 2013-02-06 04:59:26
@Akam得到500個內部服務器錯誤。 –
您是否刪除了這個'http:// domainname.com/blog/jquery/ajax-based-instant-image-upload/'?你確定這條路還存在嗎(/2012/03/18/ajax-based-instant-image-upload.html)? – 2013-02-06 05:03:48