bravo14 Posted December 12, 2014 Share Posted December 12, 2014 Hi all I am using the following rewrite rule RewriteRule ^news([a-z0-9_-]+)/([a-z0-9_-]+)(/)?$ news.php?id=$1&identifier=$2 when I use the link generated I get a 404 Not Found but if I go the genuine URL e.g. www.jasondoyle69.com/news.php?id=[id]&identifier=[identifier], then the page is displayed correctly. My question is, how do I do the rewrite rule for this, where there two php variables? Quote Link to comment https://forums.phpfreaks.com/topic/293059-htaccess-with-two-variables/ Share on other sites More sharing options...
Ch0cu3r Posted December 12, 2014 Share Posted December 12, 2014 (edited) What does your clean url look like? Your rewriteRule will match the following url site.com/newsid/identifier Also make sure you have added RewriteEngine On before any Rewrite directives. Edited December 12, 2014 by Ch0cu3r Quote Link to comment https://forums.phpfreaks.com/topic/293059-htaccess-with-two-variables/#findComment-1499441 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.