Reputation: 849
I am working on some legacy code and running into a trouble in .htaccess that I cannot overcome.
Currently, if you enter in a browser:
/news/name-of-news-article.php
the .htaccess file will call the database:
RewriteRule /news/(.*).php /pages/news.php?url=$1 [L]
and work just fine.
Trouble is, that I would like to include an optional variable in the url so that if I want to include an autoplay video - everything I try in the .htaccess to look for it, seems to kill the page and if I don't change the .htaccess it can't find the optional video=true.
/news/name-of-news-article.php?video=true
Upvotes: 0
Views: 72
Reputation: 886
You should add QSA
parameter to your rewrite rule.
RewriteRule /news/(.*).php /pages/news.php?url=$1 [QSA,L]
Upvotes: 2