用 .htaccess rewrite隱藏php的get 參數

27 六月
-

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^page/(\d+)$ /rd/user.php?id=$1 [L] RewriteRule ^(.*)[\/]$ /rd/abc.php?start=$1 [L,QSA] </IfModule>

http://domain.com/page/5 導向 /rd/user.php?id=5
http://domain.com/login/ 導向 /rd/abc.php?start=login

這篇文章的迴響已關閉