日产精品一区二区三区免费,久久精品a一国产成人免费网站 ,亚洲午夜久久久久电影网,日本r级电影在线观看,精品日产一区二区三区成人网,色仆女在线观看视频免费,国产精品久久久影院亚瑟 ,久久成人无码午夜

朗創(chuàng)營銷,專業(yè)鄭州抖音推廣,鄭州短視頻代運營,鄭州抖音代運營服務公司 聯(lián)系我們:185-3093-0310
聯(lián)系電話

wordpress偽靜態(tài)設置方法(Windows平臺)

加入時間:2013-01-06 09:25:25文章來源: 朗創(chuàng)網(wǎng)絡營銷
WordPress-SEO


wordpress偽靜態(tài)設置方法(Windows平臺)

 
方法一:新建一個記事本,將以下文件粘貼到記事本里面,然后保存為 httpd.ini ,并上傳到網(wǎng)站根目錄。

[ISAPI_Rewrite]
# Defend your computer from some worm attacks
#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /software-files/(.*) /software-files/$1 [L]
RewriteRule /images/(.*) /images/$1 [L]
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
RewriteRule /wap(.*) /wap$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]

方法二:將下面代碼保存為 404.php ,進入空間面板,設置這個 404 頁面即可。

 

<?php
// This is the default file for the site. Usually index.php
$default = ‘index.php’;

// The name of this file.
// Set this value for the URL in Custom Error Properties of your website in IIS.
// Goto: IIS Manager > Websites > [Site Name] > Properties > Custom Errors >
// 404 & 404;2 & 404;3 > URL (Requires a ‘/’ prefix in IIS).
$thisfile = ’404.php’; //404.php修改為你的404頁面名稱即可

$_SERVER['ORIG_PATH_TRANSLATED'] = str_replace($thisfile, $default, $_SERVER['ORIG_PATH_TRANSLATED']);
$_SERVER['SCRIPT_FILENAME'] = str_replace($thisfile, $default, $_SERVER['SCRIPT_FILENAME']);
$_SERVER['ORIG_PATH_INFO'] = str_replace($thisfile, $default, $_SERVER['ORIG_PATH_INFO']);
$_SERVER['SCRIPT_NAME'] = str_replace($thisfile, $default, $_SERVER['SCRIPT_NAME']);
$_SERVER['PHP_SELF'] = str_replace($thisfile, $default, $_SERVER['PHP_SELF']);
$_SERVER['PATH_INFO'] = false;

$qs =& $_SERVER['QUERY_STRING'];
$ru =& $_SERVER['REQUEST_URI'];
$pos = strrpos($qs, ‘://’);
$pos = strpos($qs, ‘/’, $pos + 4);
$_SERVER['URL'] = $ru = substr($qs, $pos);
$qs = trim(stristr($ru, ‘?’), ‘?’);

// Required for WordPress 2.8+
$_SERVER['HTTP_X_ORIGINAL_URL'] = $ru;

// Fix GET vars
foreach ( $_GET as $var => $val ) {
if ( substr($var, 0, 3) == ’404′) {
if ( strstr($var, ‘?’) ) {
$newvar = substr($var, strpos($var, ‘?’) + 1);
$_GET[$newvar] = $val;
}
unset($_GET[$var]);
}
break;
}
include($default);
?>


相關文章:wordpress偽靜態(tài)設置方法(Linux平臺)