1
我正在一個網站上的所有網頁都在谷歌索引,但沒有一個網頁排名。一段時間後,該網站轉移到100%https,我懷疑由於htaccess代碼可能會出現某種重複的內容問題。這裏是我繼承了代碼:htaccess並可能導致重複的內容
RewriteEngine On
RewriteBase/
#
#Redirect to wwww.example.com
#rewritecond %{http_host} ^example.com [nc]
#Rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
#
#Remove the index.php after domain.com/index.phpl
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://www.example.com/$1 [R=301,nc]
rewritecond %{THE_REQUEST} ^[c-t]{3,9}\ /index\.php\ HTTP/ [NC]
Rewriterule ^(.*)index\.php /$1 [R=301]
ErrorDocument 404 /404Error.php
#Begin Redirects
#FOR DIRECTORY REDIRECT
RewriteCond %{QUERY_STRING} &?p=11&?
RewriteRule ^exampleblog/$ http://www.example.com/new-york.php? [R=301,L]
RedirectPermanent /about.html https://www.example.com/about.php
RedirectPermanent /example-video.php https://www.example.com/
RedirectPermanent /brooklyn.php https://www.example.com/kings-county.php
這是一個靜態的網站,使之指向所有頁面的htaccess的是生產一些奇怪的結果,如https://www.example.com/about.php/index.php
我試圖讓清理代碼該網址的https版本,例如https://www.example.com/,並且不會爲此創建重複的內容或任何其他問題。在此先感謝任何能夠指引我朝着正確方向的人。