好吧,我对.htaccess有点麻烦,因为我是初学者。这是我想要完成的。htaccess - 用两条规则重写url
URL DESIRED: example.com/package/forest/
我现在拥有的一切:
RewriteRule ^package/forest/$
/deep/file/do_stuff.php?action=package&location=forest [R=301,QSA,L]
这是工作的打算,当你去example.com/package/forest你会得到由do_stuff.php生成的页面。我无法得到的难题是,如果我想发送额外的GET变量到do_stuff页面,但保持相同的URL。
开头的URL: example.com/package/forest/list/5/2015-10-03
STILL所需的URL: example.com/package/forest
区别在于,我想重写或重定向,不确定这个词,是
/deep/file/do_stuff.php?action=package&location=forest&pictures=5&date=2015-10-03
这次。
不知道如何堆栈规则,以便我最终使用相同的URL,无论它们是否传递额外的变量。