301永久重定向错误页面错误

时间:2013-02-06 04:50:53

标签: php apache .htaccess mod-rewrite

我的.htaccess文件的代码如下:

# 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错误。我在我的localhost中测试了这个代码,工作文件但不是在真正的服务器上,任何人都可以告诉我哪里是确切的问题?

1 个答案:

答案 0 :(得分:1)

将博客添加到旧网址:

Redirect 301 /blog/2012/03/18/ajax-based-instant-image-upload.html http://webomnizz.com/blog/jquery