DeituiCms-UniApp教程之网站伪静态支持
DeituiCms新版伪静态统一为一下路径。
Nginx伪静态
if (!-e $request_filename) { rewrite ^/index\.html /index.php last; rewrite ^/mmadmin/([_\w]*)/([_\w]*)$ /moduleadmin.php?m=$1&a=$2 last; rewrite ^/mm/([_\w]*)/([_\w]*)$ /module.php?m=$1&a=$2 last; #default rewrite ^/index/([_\w]*)/([_\w]*)$ /index.php?m=$1&a=$2 last; rewrite ^/admin/([_\w]*)/([_\w]*)$ /admin.php?m=$1&a=$2 last; rewrite ^/shop/([_\w]*)/([_\w]*)$ /moduleshop.php?m=$1&a=$2 last; rewrite ^/sender/([_\w]*)/([_\w]*)$ /sender.php?m=$1&a=$2 last; }
Apache伪静态
RewriteEngine on RewriteBase / rewritecond %{request_filename} !-f RewriteRule ^index\.html index.php #car RewriteRule ^mmadmin/([_\w]*)/([_\w]*)$ moduleadmin.php?m=$1&a=$2 [QSA,L] RewriteRule ^mm/([_\w]*)/([_\w]*)$ module.php?m=$1&a=$2 [QSA,L] #default RewriteRule ^index/([_\w]*)/([_\w]*)$ index.php?m=$1&a=$2 [QSA,L] RewriteRule ^admin/([_\w]*)/([_\w]*)$ admin.php?m=$1&a=$2 [QSA,L] RewriteRule ^shop/([_\w]*)/([_\w]*)$ moduleshop.php?m=$1&a=$2 [QSA,L] RewriteRule ^sender/([_\w]*)/([_\w]*)$ sender.php?m=$1&a=$2 [QSA,L]