Skip to content

Instantly share code, notes, and snippets.

@zsmynl
Created February 22, 2014 11:22
Show Gist options
  • Save zsmynl/9152308 to your computer and use it in GitHub Desktop.
Save zsmynl/9152308 to your computer and use it in GitHub Desktop.
记一次htaccess伪静态
RewriteEngine on
RewriteRule ^discover$ index.php?do=discover
RewriteRule ^content/([a-zA-Z0-9_-]+)$ index.php?do=content&workid=$1
RewriteRule ^discover/([a-zA-Z0-9_-]+)$ index.php?do=discover&id=$1
RewriteRule ^content/([a-zA-Z0-9_-]+)/id/([a-zA-Z0-9_-]+)$ index.php?do=content&workid=$1&contentId=$2
RewriteRule ^home/([a-zA-Z0-9_-]+)$ index.php?do=home&id=$1
RewriteRule ^works/([a-zA-Z0-9_-]+)$ index.php?do=home&act=works&id=$1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment