Wordpress

时间:2018-07-24 08:39:05

标签: wordpress .htaccess

htaccess文件

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]


    Redirect /p-contact-us http://www.example.com/contact/
    Redirect /p-our-services http://www.example.com/services/
    Redirect /white_papers http://www.example.com/insights/
    Redirect /case_studies http://www.example.com/insights/
    Redirect /blog http://www.example.com/news-events/
    Redirect /press_releases http://www.example.com/news-events/
    Redirect /white_papers.php http://www.example.com/insights/
    Redirect /p-services http://www.example.com/services/
    Redirect /p-industry-experience http://www.example.com/about/
    Redirect /p-thought-leadership http://www.example.com/about/leadership-team/
    Redirect /press_releases.php http://www.example.com/news-events/
    Redirect /p-about http://www.example.com/about/
    Redirect /p-careers http://www.example.com/careers/
    Redirect /p-merger-integration http://www.example.com/services/management-consulting/merger-integration/
    Redirect /p-organizational-development http://www.example.com/services/management-consulting/organizational-development/
    Redirect /p-value-assurance http://www.example.com/services/management-consulting/value-assurance/
    Redirect /p-business-continuity-compliance2 http://www.example.com/services/management-consulting/business-continuity-compliance/
    Redirect /p-it-strategy-governance http://www.example.com/services/it-strategic-services/it-strategy-governance/
    Redirect /p-outsourcing-advisory-services http://www.example.com/services/it-strategic-services/outsourcing-advisory-vendor-management/
    Redirect /p-benchmarking-analysis http://www.example.com/services/it-strategic-services/benchmarking-analysis/
    Redirect /p-it-operations-management http://www.example.com/services/it-strategic-services/it-operations-management-itil/
    Redirect /p-it-portfolio-management http://www.example.com/services/it-strategic-services/it-portfolio-management/
    Redirect /p-application-and-erp-strategy http://www.example.com/services/it-strategic-services/application-and-erp-strategy/
    Redirect /p-program-and-project-management2 http://www.example.com/services/project-leadership/project-program-management/
    Redirect /p-business-decision-analytics http://www.example.com/services/project-leadership/business-analysis-requirements/
    Redirect /p-change-management-and-communication http://www.example.com/services/management-consulting/
    Redirect /p-technical-subject-matter-expert http://www.example.com/services/it-strategic-services/
    Redirect /p-major-capital-projects-(mcp) http://www.example.com/services/project-leadership/major-capital-projects-mcp/
    Redirect /p-information-management-strategy http://www.example.com/services/analytics-information-management/information-strategy-architecture/
    Redirect /p-data-management-governance http://www.example.com/services/analytics-information-management/data-governance/
    Redirect /p-about-us http://www.example.com/about/
    Redirect /p-jonas-georgsson http://www.example.com/about/leadership-team/
    Redirect /p-dhiren-shethia http://www.example.com/about/leadership-team/
    Redirect /p-rick-snell http://www.example.com/about/leadership-team/
    </IfModule>

    # Block WordPress xmlrpc.php requests
    <Files xmlrpc.php>
    deny from all
    </Files>

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

在这里,从新闻事件开始的几页中,我遇到了“太多问题”的问题,并且网址变得像

http://www.example.com/news-events//2018/07/12/erp-on-cloud-a-new-approach-to-selecting-a-cloud-erp-in-the-digital-age-blog/ 

我该如何解决?我什至尝试从上面的新闻事件/中删除“ /”,但仍然遇到相同的错误。我清除了cookie,缓存等,但没有用。之前一切正常,但突然有几个页面停止正确加载。

1 个答案:

答案 0 :(得分:0)

这不是WordPress问题或错误,而是与Web服务器或主机提供商的配置有关的问题。如果确实遇到此类错误,则可以通过在WordPress根.htaccess文件中添加1行来解决此问题。请按照以下逐步步骤解决此问题:

  1. 使用FTP连接到您的WordPress网站。
  2. 从WordPress网站的根目录下载.htaccess文件。
  3. 在WordPress规则之前添加以下行(在#BEGIN WordPress行上方)

    ErrorDocument 401默认

答案参考:wpwhitesecurity.com