httpd.ini转换为.htaccess

[ISAPI_Rewrite]

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

1个回答

nginx rewrite rule

start

rewrite “^/sy/index.html$” /sy/ last;
rewrite “^(.*)/user/(.*)/(.*)/(.*)$” $1/index.php\?user&user_id=$2&q=code/$3/$4 last;
rewrite “^(.*)/user/(.*)/(.*)$" $1/index.php\?user&user_id=$2&q=code/$3 last;
rewrite "^(.*)/user/(.*)$" $1/index.php\?user&user_id=$2 last;

下面省略

(不知道这个是不是你想要的)

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问