【问题标题】:Codeigniter routers Google finding pages do not existCodeigniter 路由器 Google 查找页面不存在
【发布时间】:2011-07-21 19:45:44
【问题描述】:

Google 正在创建损坏的链接,报告说: 2011 年 7 月 19 日

http://www.therapistjobsonline.com/openings/2011/06/21/speech-language-pathologist-jobs-in-paris/texas-speech-therapy-jobs/physical-occupational-speech/blog/index.php

404(未找到)

我不确定是 htaces 文件还是 codeigniter 控制器搞砸了

在我们使用的 codeigniter 路由文件中:

$route['default_controller'] = "content_pages";
$route['scaffolding_trigger'] = "";

//include_once BASEPATH . "cache/routes.php";
//$routes['listings/permanent-therapy-jobs'] = "jobs/job_listings/3//";

$route['physical-occupational-speech/therapist-licensure-information.html'] = "content_pages/therapist_licensure_information";
$route['physical-occupational-speech/mission.html'] = "content_pages/mission";
$route['physical-occupational-speech/therapy-state-associations.html'] = "content_pages/therapy_state_associations";
$route['physical-occupational-speech/candidate-registration.html'] = "registration/candidate_registration";
$route['physical-occupational-speech/facility-registration.html'] = "registration/facility_registration";
$route['physical-occupational-speech/therapist-referral-program.html'] = "content_pages/therapist_referral_program";
$route['physical-occupational-speech/occupational-therapist-job-description.html'] = "content_pages/occupational_therapist_job_description";
$route['therapy-schools.html'] = "content_pages/schools";
$route['physical-occupational-speech/frequently-asked-questions-faq.html'] = "content_pages/frequently_asked_questions";
$route['physical-occupational-speech/([a-z-]+).html'] = "content_pages/$1";

$route['apply-job/([0-9]+).html'] = "jobs/apply/$1";

$route['openings/([0-9]+)/([0-9]+)/([0-9]+)/([a-z-]+)-jobs-in-([a-z-]+)/([a-z-]+)-therapy-jobs/([0-9]+).html'] = "jobs/job_details/$6";
//$route['listings/therapy-jobs'] = "jobs/job_listings///"; //All Jobs
$route['listings/therapy-jobs'] = "jobs/job_listings////0"; //All Jobs
$route['listings/therapy-jobs/([0-9]+)'] = "jobs/job_listings////$1"; //All Jobs

$route['([a-z]+)-therapy-schools-in-([a-zA-z-]+)'] = "content_pages/schools_state/$1/$2";

【问题讨论】:

  • 我很困惑......谷歌在哪里适合这个?
  • 谷歌网站管理员工具正在寻找这些链接

标签: php .htaccess codeigniter


【解决方案1】:

查看路线中的这条特定规则

$route['openings/([0-9]+)/([0-9]+)/([0-9]+)/([a-z-]+)-jobs-in-([a-z-]+)/([a-z-]+)-therapy-jobs/([0-9]+).html'] = "jobs/job_details/$6";

您的链接http://www.therapistjobsonline.com/openings/2011/06/21/speech-language-pathologist-jobs-in-paris/texas-speech-therapy-jobs/physical-occupational-speech/blog/index.php 显然无效。链接需要以id.html结尾。

您可能在某些页面上生成了这些链接,而该页面正在生成非法链接。 Google 只是在为您网站中的公共页面编制索引。尝试使用日志找出这些非法链接的来源。

【讨论】:

  • 选择这个以获得最佳建议,但仍在尝试解决。我找到了创建假定错误链接的页面,但是当我加载页面时,我无法在任何地方找到错误链接... fml
【解决方案2】:

抱歉,有什么问题吗?

您正在尝试访问似乎不存在的“开口”控制器:http://www.therapistjobsonline.com/openings/。为开口设置控制器,设置处理开口的路线,或将其设置在您的 .htaccess 中。

【讨论】:

    猜你喜欢
    • 2013-08-12
    • 1970-01-01
    • 2015-03-29
    • 1970-01-01
    • 1970-01-01
    • 2015-11-22
    • 1970-01-01
    • 2019-08-02
    • 1970-01-01
    相关资源
    最近更新 更多