可以掩饰这个:
www.site.com/latest_news/10518271191304876236
到这个
www.site.com/latest_news /
但我仍然需要使用PHP访问'10518271191304876236'这部分作为ID使用。
非常感谢答案 0 :(得分:0)
你可以像这样拥有.htaccess:
Options +FollowSymlinks -MultiViews
RewriteEngine on
RewriteRule ^(latest_news/)(.+)/?$ /$1?ID=$2 [QSA,NC,L]
这个10518271191304876236
将作为查询参数ID
传递给/latest_news/
内的index.php文件。