用户名: 密码: 忘记密码? 注册
收藏此问题 发表新评论

.htaccess转换httpd格式

.htaccess转换成httpd格式

自己搞了一个多小时,改来改去都不能用,请高手帮我转一下,谢了

.htaccess代码如下:



<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^/?tupian/(.*).jpg$ /pic.php?r=1&img=/tupian/$1.jpg [L]
# RewriteRule ^/?pic/?allimg/?(\w+)/?(\w+)-(\w+).jpg$ /pic.php?r=2&img=/pic/allimg/$1/$2-$3.jpg [L]
# RewriteRule ^/?pic/(.*)-(.*).jpg$ /pic.php?r=2&img=/pic/$1-$2.jpg [L]
RewriteRule ^/?pic/(.*).jpg$ /pic.php?r=2&img=/pic/$1.jpg [L]

RewriteRule ^/?beautiful/$ /list.php?cat=beautiful [L]
RewriteRule ^/?sexy/$ /list.php?cat=sexy [L]
RewriteRule ^/?model/$ /list.php?cat=model [L]
RewriteRule ^/?stars/$ /list.php?cat=stars [L]
RewriteRule ^/?hd/$ /list.php?cat=hd [L]

RewriteRule ^/?beautiful$ /list.php?cat=beautiful [L]
RewriteRule ^/?sexy$ /list.php?cat=sexy [L]
RewriteRule ^/?model$ /list.php?cat=model [L]
RewriteRule ^/?stars$ /list.php?cat=stars [L]
RewriteRule ^/?hd$ /list.php?cat=hd [L]

RewriteRule ^/?beautiful/list_(.*)_(.*).html$ /list.php?cat=beautiful&page=list_$1_$2.html [L]
RewriteRule ^/?model/list_(.*)_(.*).html$ /list.php?cat=model&page=list_$1_$2.html [L]
RewriteRule ^/?sexy/list_(.*)_(.*).html$ /list.php?cat=sexy&page=list_$1_$2.html [L]
RewriteRule ^/?stars/list_(.*)_(.*).html$ /list.php?cat=stars&page=list_$1_$2.html [L]
RewriteRule ^/?hd/list_(.*)_(.*).html$ /list.php?cat=hd&page=list_$1_$2.html [L]

#RewriteRule ^/?beautiful/(.*)_(.*).html$ /view.php?cat=beautiful&page=$1_$2.html [L]
#RewriteRule ^/?model/(.*)_(.*).html$ /view.php?cat=model&page=$1_$2.html [L]
#RewriteRule ^/?sexy/(.*)_(.*).html$ /view.php?cat=sexy&page=$1_$2.html [L]
#RewriteRule ^/?stars/(.*)_(.*).html$ /view.php?cat=stars&page=$1_$2.html [L]
#RewriteRule ^/?hd/(.*)_(.*).html$ /view.php?cat=hd&page=$1_$2.html [L]

RewriteRule ^/?beautiful/(.*).html$ /view.php?cat=beautiful&page=$1.html [L]
RewriteRule ^/?model/(.*).html$ /view.php?cat=model&page=$1.html [L]
RewriteRule ^/?sexy/(.*).html$ /view.php?cat=sexy&page=$1.html [L]
RewriteRule ^/?stars/(.*).html$ /view.php?cat=stars&page=$1.html [L]
RewriteRule ^/?hd/(.*).html$ /view.php?cat=hd&page=$1.html [L]

</IfModule>
昵称: cntcnf2008  时间: 2011-06-07 21:22:32
apache里的特殊字符可以不转义,但ISAPI_Rewrite里的特殊字符就必须转义。
如(仅仅是字符,而不是正则的表达才转义):
apache:
RewriteRule ^(.*)-tmp-(.*)$ $1.php?$2
ISAPI_Rewrite:
RewriteRule ^(.*)-tmp-(.*)$ $1\.php\?$2














------------------------------------------------------------------------------------------------
http://www.jiemengwu.com/ 解梦屋 http://www.phpzy.com/php/ 绿色php资源http://www.shopfw.com网店服务http://www.jqk8.com剧情看吧
昵称: woshitiaotiao  时间: 2011-06-07 21:36:12

朋友,可以根据我提供的代码,帮我修改完整么?这方面不是很懂,如果需要分多些,我可以加












……
[/Quote]
昵称: cntcnf2008  时间: 2011-06-07 21:43:07
发表评论
昵称:
内容:
验证: