Skip to content

Instantly share code, notes, and snippets.

@zsmynl
Created February 25, 2014 07:59
Show Gist options
  • Save zsmynl/9204755 to your computer and use it in GitHub Desktop.
Save zsmynl/9204755 to your computer and use it in GitHub Desktop.
重定向学习;
[ISAPI_Rewrite] / RewriteEngine on
RewriteRule ^/(login|register|user)$ /index.php?do=$1 [L]
#register
RewriteRule ^/register/(.*?)$ /index.php?do=register&key=$1 [L]
RewriteRule ^/register-validate/(.*?)$ /index.php?do=register&act=validate&key=$1 [L]
#for Nginx
rewrite ^/(login|register|user)$ /index.php?do=$1 last;
rewrite ^/register/(.*?)$ /index.php?do=register&key=$1 last;
rewrite ^/register-validate/(.*?)$ /index.php?do=register&act=validate&key=$1 last;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment