小雅 发表于 2014-8-13 16:44:39

httpd.ini转.htaccess,有会转换的吗?

配置好环境(lamp),传了程序,发现不能用,
程序生成伪静态,刚发现原来是没有.htaccess文件,只有个httpd.ini
有会规则转换的吗?我贴一下规则,哪位大大帮忙转换一下



# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32


RewriteRule        ^(.*)/user/(.*)/(.*)/(.*)$ $1/index\.php\?user&user_id=$2&q=code/$3/$4
RewriteRule        ^(.*)/user/(.*)/(.*)$ $1/index\.php\?user&user_id=$2&q=code/$3
RewriteRule        ^(.*)/user/(.*)$ $1/index\.php\?user&user_id=$2
RewriteRule        ^(.*)/u/(.*)/(.*)$ $1/index\.php\?home&user_id=$2&q=$3
RewriteRule        ^(.*)/u/(.*)$ $1/index\.php\?home&user_id=$2
RewriteRule        ^(.*)/(.*)/(.*)/index.html$ $1/index\.php\?$2&nid=$3
RewriteRule        ^(.*)/(.*)/(.*)/index(.*).html$ $1/index\.php?$2&nid=$3&page=$4
RewriteRule        ^(.*)/(.*)/(.*)/a(.*).html$ $1/index\.php\?$2&nid=$3&article_id=$4
RewriteRule        ^(.*)/(.*)/(.*)/a(.*).html?(.*)$ $1/index\.php\?$2&nid=$3&article_id=$4&$5
RewriteRule        ^(.*)/(.*)/index.html$ $1/index\.php\?$2
RewriteRule        ^(.*)/(.*)/index(.*).html$ $1/index\.php\?$2&page=$3
RewriteRule        ^(.*)/(.*)/index(.*).html?(.*)$ $1/index\.php\?$2&page=$3&$4
RewriteRule        ^(.*)/(.*)/a(.*)_(.*).html$ $1/index\.php\?$2&article_id=$3&page=$4
RewriteRule        ^(.*)/(.*)/a(.*).html$ $1/index\.php\?$2&article_id=$3
RewriteRule        ^(.*)/(.*)/a(.*).html?(.*)$ $1/index\.php\?$2&article_id=$3&$4

Altair 发表于 2014-8-14 19:23:38

你先试试能不能新建 .htaccess文件吧   应该可以的 既然是 lamp环境
页: [1]
查看完整版本: httpd.ini转.htaccess,有会转换的吗?