原始网址为www.example.com/photos
需要一个干净的网址,例如......
显示所有相册网址应该像
www.example.com/photos/album-name
打开相册或第1页或返回第1页时,网址应为
www.example.com/photos/album-name/page-number
当用户在第二页时,URL应该像
*
答案 0 :(得分:0)
试试这个,
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/([\w-]+)$ $1.php?album=$2 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/([\w-]+)/([\d-]+)$ $1.php?album=$2&page=$3 [L]