【发布时间】:2015-05-24 16:36:06
【问题描述】:
我有一个网站。根据我的谷歌网站管理员,在这个网站上我有一些 404 文件未找到错误,尽管所有文件都存在。它们如下:
http://firstcovers.net/http//firstcovers.net/
http://firstcovers.net/category/1/http//firstcovers.net/
http://firstcovers.net/category/8/4/http//firstcovers.net/
http://firstcovers.net/category/17/2/http//firstcovers.net/
http://firstcovers.net/category/20/2/http//firstcovers.net/
http://firstcovers.net/facebook-cover/1317/privacy.php
http://firstcovers.net/facebook-cover/1317/terms.php
http://firstcovers.net/facebook-cover/1286/privacy.php
http://firstcovers.net/facebook-cover/338/terms.php
.htaccess 文件的结构如下:
DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html
# Use PHP5 Single php.ini as default
#AddHandler fcgid-script .php
RewriteEngine On
RewriteRule ^latest.html /index.php?latest=y [L]
RewriteRule ^random.html /index.php?random=y [L]
RewriteRule ^showall.html /index.php?showall=y [L]
RewriteRule ^about.html /about.php [L]
RewriteRule ^userupload.html /userupload.php [L]
RewriteRule ^get-timeline.html /how.php [L]
RewriteRule ^facebook-cover-([0-9]+).html /detailpage.php?cp=$1 [L]
RewriteRule ^facebook-cover/([0-9]+)/([^/]*).html /detailpage.php?cp=$1 [L]
RewriteRule ^preview/([0-9]+)/([^/]*).html /detailpage.php?preview=y&cp=$1 [L]
RewriteRule ^category/([^/]*)/([^/]*).html /index.php?cat=$1 [L]
RewriteRule ^category/([^/]*)/([^/]*)/([^/]*).html /index.php?cat=$1&page=$2 [L]
RewriteRule ^cover-([0-9]+).html /image.php?picID=$1 [L]
RewriteBase /
RewriteRule ^css/(.*\.css) /combine.php?type=css&files=$1
RewriteRule ^javascript/(.*\.js) /combine.php?type=javascript&files=$1
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
<FilesMatch "\\.(js|css|html|htm|php|xml)$">
# compress text, HTML, JavaScript, CSS, and XML
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# remove browser bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent
SetOutputFilter DEFLATE
</FilesMatch>
Header set Expires "Thu, 15 Apr 2030 20:00:00 GMT"
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} .(gif|jpe?g?|png)$ [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+.)?firstcovers. [NC]
RewriteRule .(gif|jpe?g?|png)$ - [F,NC,L]
</ifModule>
RewriteCond %{HTTP_REFERER} !^http://www.google.com/reader/view/.*$ [NC]
# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>
FileETag MTime Size
我已尽力更改 .htaccess 文件的正则表达式。但我仍然犯了一些错误。我无法追查那个错误。
我请求本网站的成员帮助我。
**提前致谢。
你的朋友。
V K 锯。**
【问题讨论】:
-
你在说什么内部网址?我的根目录中没有“类别”或“facebook-cover”文件夹。我只是重定向它们。但他们实际上并没有完成。
-
是的,这就是我需要知道的,即这些应该被重写/重定向到什么?
-
这是我朋友的网站。他已经由一些开发人员完成了,但他不再联系,所以我无法弄清楚。但是由于您的声誉看起来不错,您可以在查看完整的 404 not found 列表后弄清楚这一点。如果你愿意,我可以付钱。告诉我费用。
-
如果我理解了这一切,我就不会询问。还有很多其他网站,您可以在其中付款并完成工作。在这里,我们不是为了钱,我们只是想帮助社区。span>
-
我尊重这个 Anubhava,但你能帮我摆脱这种情况吗?
标签: php html .htaccess http-status-code-404 google-search-console