でソフト404を排除しますURLのソフト404エラーhttp://example.com/huge-master/publicは、私は私がGoogleにサイトを提出してきましたが、それはクロールされた際に、Googleが発見した<a href="https://github.com/panique/huge" rel="nofollow noreferrer">https://github.com/panique/huge</a></p> <p>に取り組んでいるプロジェクトのベースとしてこのMVCプロジェクトを使用していhtaccessの
私はそのURLをしようとするとhttps://httpstatus.io/で、それは私がhtaccessファイルと完全に役に立たないんだ、と私はGoogleが何を望んでいるか、本当にわからないように、ヘッダが301 -> 200
である私に指示私はソフト404を防ぐために変更する必要があることをアドバイスできますか?
私は次のようにhttp://example.com/huge-master/に位置htaccessファイルがあるので、それは、htaccessファイルの変更になります推測している:
# This file is - if you set up HUGE correctly - not needed.
# But, for fallback reasons (if you don't route your vhost to /public), it will stay here.
RewriteEngine on
RewriteRule ^(.*) public/$1 [L]
# Everything from is for browser caching and is totally optional
# Deflate Compression by FileType
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-shockwave-flash
</IfModule>
# Set browser caching to 1 month
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/html "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
</IfModule>
<ifmodule mod_headers.c>
# if you want to prevent your site from being embedded into other sites via an iframe (sometimes used for scam), then
# simply uncomment these lines below. you need to have apache rewrite headers activated, usually via
# "a2enmod rewrite headers" on the command line
#Header set X-Frame-Options Deny
#Header always append X-Frame-Options SAMEORIGIN
<filesmatch "\\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesmatch>
<filesmatch "\\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesmatch>
<filesmatch "\\.(js)$">
Header set Cache-Control "max-age=216000, private"
</filesmatch>
</ifmodule>
次のものが含まれていhttp://example.com/huge-master/public/にある別のhtaccessファイルがあります:
は、# Necessary to prevent problems when using a controller named "index" and having a root index.php
# more here: http://httpd.apache.org/docs/2.2/content-negotiation.html
Options -MultiViews
# Activates URL rewriting (like myproject.com/controller/action/1/2/3)
RewriteEngine On
# Prevent people from looking directly into folders
Options -Indexes
# If the following conditions are true, then rewrite the URL:
# If the requested filename is not a directory,
RewriteCond %{REQUEST_FILENAME} !-d
# and if the requested filename is not a regular file that exists,
RewriteCond %{REQUEST_FILENAME} !-f
# and if the requested filename is not a symbolic link,
RewriteCond %{REQUEST_FILENAME} !-l
# then rewrite the URL in the following way:
# Take the whole request filename and provide it as the value of a
# "url" query parameter to index.php. Append any query string from
# the original URL as further query parameters (QSA), and stop
# processing this .htaccess file (L).
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
さらに詳しい情報が必要な場合は、お尋ねください。私は残念ですが、これでは十分ではありません。私が言ったように、それはhtaccessになると全く役に立たない!