Home / 主机知识 / windows下实现wordpress的伪静态规则

windows下实现wordpress的伪静态规则

写httpd.ini

[ISAPI_Rewrite]

    # 3600 = 1 hour

    CacheClockRate 3600

 

    RepeatLimit 32

 

    # Protect httpd.ini and httpd.parse.errors files

    # from accessing through HTTP

 

    # wordpress 伪静态规则

    # For tag(中文标签以及标签翻页的规则)

    RewriteRule /tag/(.*)/page/(\d+)$ /index\.php\?tag=$1&paged=$2

    RewriteRule /tag/(.+)$ /index\.php\?tag=$1

    # For category(中文分类以及分类翻页的规则)

    RewriteRule /category/(.*)/page/(\d+)$ /index\.php\?category_name=$1&paged=$2

    RewriteRule /category/(.*) /index\.php\?category_name=$1

    # For sitemapxml

    RewriteRule /sitemap.xml /sitemap.xml [L]

    RewriteRule /sitemap.html /sitemap.html [L]

    RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]

    RewriteRule /favicon.ico /favicon.ico [L]

    # For file-based wordpress content (i.e. theme), admin, etc.

    RewriteRule /wp-(.*) /wp-$1 [L]

    # For normal wordpress content, via index.php

    RewriteRule ^/$ /index.php [L]

    RewriteRule /(.*) /index.php/$1 [L]

About admin

Check Also

win2012评估版转正式版

把版本转换成正式版本: 这条命令是转换成数据中心版本: DISM /online /Set-Edition:ServerDatacenter /AcceptEula /ProductKey:XXXXXXXXXXXXX 这条命令是转换成标准版本: DISM /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:XXXXXXXXXXXXX 服务器将重启两次 Windows Server 2012 R2 Standard RETAIL KEY Q8MTR-F2N87-JPQ4C-8CFK9-C7HJM HK69K-3N8Y2-VB2XH-4HYGY-CWDWM W689N-TPP83-V2Q42-683JR-X2C2B

发表回复