欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

學(xué)習(xí)Apache的mod rewrite、access寫法

 更新時(shí)間:2008年09月13日 17:21:02   作者:  
Apache的mod_rewrite是提供了強(qiáng)大URL操作的殺手級的模塊,可以實(shí)現(xiàn)幾乎所有你夢想的URL操作類型,其代價(jià)是你必須接受其復(fù)雜性,因?yàn)閙od_rewrite的主要障礙就是初學(xué)者不容易理解和運(yùn)用,即使是Apache專家有時(shí)也會(huì)發(fā)掘出mod_rewrite的新用途。
Apache 的 mod rewrite
RewriteEngine On RewriteBase /B2B/website/ RewriteRule ^article-([0-9]+)\.html$ view_details.php?browse=profile&id=$1
以上這個(gè)測試通過的。如果不行關(guān)鍵是服務(wù)器端,以后的怎么改就發(fā)揮了
關(guān)于圖片的 可以加一個(gè) /503(id)/title.htm 這樣一定不重復(fù)了,用503或其他數(shù)字或者是abc也行,不顧oabc還想不是很理想,學(xué)學(xué)ii的,他就是用數(shù)字的定義所有的功能就行了

這個(gè)很有參考價(jià)值的
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$ $1/archiver/index.php?$2
RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?fid=$2&page=$3
RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3
RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3
RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2
</IfModule>
discuz的
最強(qiáng)wordpress的
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
關(guān)鍵看看 %怎么用了 還有 [...]

相關(guān)文章

最新評論