0

Ich bin total verwirrt.CodeIgniter 404 Routing - 404 defekte Links und Unfähigkeit für Google Website zu crawlen ABER alles sieht gut aus

Ich betreibe die Website http://citylightstours.com

Es ist auf der CodeIgniter Plattform gebaut wird.

Ich bemerkte in der Google Search Console, dass nur 1 Seite meiner Website bei Google indiziert ist. Alle anderen Seiten hatten 404 Fehler und deshalb listete Google sie nicht auf.

Ich dachte daher, es war eine fehlerhafte Sitemap so ging zu https://www.xml-sitemaps.com/, um eine neue zu generieren. Ich habe die Root-URL eingegeben und zu meiner Überraschung waren nur Blogeinträge in der generierten XML-Sitemap enthalten - KEINE der Hauptseiten meiner Seite waren da !!

Ich ging daher zu einer anderen Website nach defekten Links http://www.brokenlinkcheck.com/ zu überprüfen und zu meiner Überraschung, jede Seite auf meiner Website hatte einen Status von 404 defekten Link. Durch Klicken auf diese Links wird jedoch eine gültige Seite angezeigt. Sie sind daher keine gebrochenen Links und ich kann die Website gut navigieren.

Ich verstehe daher nicht, warum automatisierte Roboter mit einer Liste von 404s kommen und die Website nicht indexieren, wenn alle Links zu funktionieren scheinen!

Irgendwelche Ideen?

THanks

UPDATE: Ich habe versucht, ein Abrufen und rendern von Such Konsole zu und eine gültige Seite zu tun, die auf Browser gibt einen Fehler nicht gefunden werden angezeigt!

AKTUALISIERUNG 2: Nach der Site: Citylightstours.com in Google merke ich, dass die einzigen Seiten indiziert sind die Blog-Seiten. Alle anderen Seiten sind aus dem Index herausgefallen - irgendwelche Ideen warum?

UPDATE 3: Einer der Kommentare schlug vor, dass es ein Problem mit der .htaccess sein könnte, also poste ich es hier in der Hoffnung, dass jemand etwas entdeckt. Danke

UPDATE 4: Nach dem Lesen dieses Beitrags enter link description here Ich denke, es kann sein, dass der Server einen 404-Fehler mit der tatsächlichen Seitencode als der Kunde 404 menschenlesbare Nachricht zurückgibt !! Wie gesagt, ich benutze codeigniter, also muss es etwas mit der benutzerdefinierten 404-Seite und dem Routing zu tun haben. Ich weiß nicht, wie man das debuggt oder auch, was man anschaut. Kann mir jemand helfen? ... DANKE!

<IfModule mod_rewrite.c> 
# Development 
    RewriteEngine On 
    RewriteBase/
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteCond $1 !^(index\.php|images|scripts|styles|vendor|robots\.txt) 
    RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule> 

DirectoryIndex index.php 
RewriteEngine on 
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico) 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA] 


# ---------------------------------------------------------------------- 
# Better website experience for IE users 
# ---------------------------------------------------------------------- 

<IfModule mod_setenvif.c> 
    <IfModule mod_headers.c> 
    BrowserMatch MSIE ie 
    Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie 
    </IfModule> 
</IfModule> 

<IfModule mod_headers.c> 
    Header append Vary User-Agent 
</IfModule> 


# ---------------------------------------------------------------------- 
# Webfont access 
# ---------------------------------------------------------------------- 

<FilesMatch "\.(ttf|otf|eot|woff|font.css)$"> 
    <IfModule mod_headers.c> 
    Header set Access-Control-Allow-Origin "*" 
    </IfModule> 
</FilesMatch> 

# ---------------------------------------------------------------------- 
# Proper MIME type for all files 
# ---------------------------------------------------------------------- 

# audio 
AddType audio/ogg      oga ogg 

# video 
AddType video/ogg      .ogv 
AddType video/mp4      .mp4 
AddType video/webm      .webm 

# Proper svg serving. Required for svg webfonts on iPad 
# twitter.com/FontSquirrel/status/14855840545 
AddType  image/svg+xml    svg svgz 
AddEncoding gzip      svgz 

# webfonts        
AddType application/vnd.ms-fontobject eot 
AddType font/truetype     ttf 
AddType font/opentype     otf 
AddType application/x-font-woff  woff 

# assorted types          
AddType image/x-icon     ico 
AddType image/webp      webp 
AddType text/cache-manifest   appcache manifest 
AddType text/x-component    htc 
AddType application/x-chrome-extension crx 
AddType application/x-xpinstall  xpi 
AddType application/octet-stream  safariextz 

# ---------------------------------------------------------------------- 
# gzip compression 
# ---------------------------------------------------------------------- 

<IfModule mod_deflate.c> 

<IfModule mod_setenvif.c> 
    <IfModule mod_headers.c> 
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding 
    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding 
    </IfModule> 
</IfModule> 

<FilesMatch "^(?!.*\.ogg$|.*\.ogv$|.*\.mp4$).+" > 

# html, txt, css, js, json, xml, htc: 
<IfModule filter_module> 
    FilterDeclare COMPRESS 
    FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/ 
    FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/ 
    FilterChain  COMPRESS 
    FilterProtocol COMPRESS change=yes;byteranges=no 
</IfModule> 
</FilesMatch> 

# webfonts and svg: 
    <FilesMatch "\.(ttf|otf|eot|svg)$" > 
    SetOutputFilter DEFLATE 
    </FilesMatch> 
</IfModule> 

# ---------------------------------------------------------------------- 
# Expires headers (for better cache control) 
# ---------------------------------------------------------------------- 

<IfModule mod_expires.c> 
    ExpiresActive on 

# Perhaps better to whitelist expires rules? Perhaps. 
    ExpiresDefault       "access plus 1 month" 

# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5) 
    ExpiresByType text/cache-manifest  "access plus 0 seconds" 

# your document html 
    ExpiresByType text/html     "access plus 0 seconds" 

# data 
    ExpiresByType text/xml     "access plus 0 seconds" 
    ExpiresByType application/xml   "access plus 0 seconds" 
    ExpiresByType application/json   "access plus 0 seconds" 

# rss feed 
    ExpiresByType application/rss+xml  "access plus 1 hour" 

# favicon (cannot be renamed) 
    ExpiresByType image/x-icon    "access plus 1 week" 

# media: images, video, audio 
    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" 
    ExpiresByType video/ogg     "access plus 1 month" 
    ExpiresByType audio/ogg     "access plus 1 month" 
    ExpiresByType video/mp4     "access plus 1 month" 
    ExpiresByType video/webm    "access plus 1 month" 

# htc files (css3pie) 
    ExpiresByType text/x-component   "access plus 1 month" 

# webfonts 
    ExpiresByType font/truetype    "access plus 1 month" 
    ExpiresByType font/opentype    "access plus 1 month" 
    ExpiresByType application/x-font-woff "access plus 1 month" 
    ExpiresByType image/svg+xml    "access plus 1 month" 
    ExpiresByType application/vnd.ms-fontobject "access plus 1 month" 

# css and javascript 
    ExpiresByType text/css     "access plus 2 months" 
    ExpiresByType application/javascript "access plus 2 months" 
    ExpiresByType text/javascript   "access plus 2 months" 

    <IfModule mod_headers.c> 
    Header append Cache-Control "public" 
    </IfModule> 

</IfModule> 

# ---------------------------------------------------------------------- 
# ETag removal 
# ---------------------------------------------------------------------- 

FileETag None 

# ---------------------------------------------------------------------- 
# Stop screen flicker in IE on CSS rollovers 
# ---------------------------------------------------------------------- 

# The following directives stop screen flicker in IE on CSS rollovers - in 
# combination with the "ExpiresByType" rules for images (see above). If 
# needed, un-comment the following rules. 

# BrowserMatch "MSIE" brokenvary=1 
# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1 
# BrowserMatch "Opera" !brokenvary 
# SetEnvIf brokenvary 1 force-no-vary 

RewriteEngine On 
RewriteCond %{HTTP_HOST} !^citylightstours\.com$ [NC] 
RewriteRule ^(.*)$ http://citylightstours.com/$1 [R=301,L] 
RewriteCond %{HTTP_USER_AGENT} libwww-perl.* 
RewriteRule .* ? [F,L] 
+0

Chk Entwickler-Konsole auf Ihrem Chrom-Browser für jede Seite, zeigt es 404 Fehler. Da könnte Problem auf Ihrer Seite sein, chk es – Zeeshan

+0

Ich überprüfte ein paar Seiten mit Chrom-Entwickler-Konsole und konnte keine 404 Fehler –

+0

Ich denke, es hat etwas mit dem WordPress-Blog auf der Website zu tun. Ich habe alle Seiten indexiert bevor ich diesen Blog hinzugefügt habe. Wenn ich die Website citylightstours.com in Google eintippe, sind die einzigen indexierten Seiten die Blogs. irgendeine idee was kann das bewirken ?? –

Antwort

0

gelöst - das Wordpress-Blog in der Seite integriert wurde die Einstellung des 404-Status für alle nicht Wordpress-Seiten, dh codeigniter Seiten

index.php von CI hatten den folgenden Code, das kommentiert werden mußte aus

/* 
*--------------------------------------------------------------- 
* WORDPRESS INTEGRATION 
*--------------------------------------------------------------- 
* The ci_site_url function helps to avoid collision between WP & CI. 
*/ 

//header("HTTP/1.0 200 OK"); 

define('WP_USE_THEMES', false); 
require_once './blog/wp-blog-header.php'; 

add_filter('site_url', 'ci_site_url', 1); 

    function ci_site_url() 
    { 
    include(APPPATH.'/config/config.php'); 
    return $config['base_url']; 
    }