我正在使用php创建一个网页。 我用htaccess创建了一个干净的网址
techoming.com/videos
现在我想添加一个get变量,例如
techoming.com/videos?cat=fun
请在这里帮助我
答案 0 :(得分:0)
这是实现这项工作的基本方法:将其添加到你的htaccess。
RewriteEngine on
RewriteRule ^videos/([A-Za-z0-9_-]*)$ /videos.php?cat=$1 [L]
用户将看到http://www.website.com/videos/fun,但您的服务器会将该链接作为http://www.website.com/videos?cat=fun
处理