Fmdpa Posted January 7, 2012 Share Posted January 7, 2012 I have a simple RewriteRule in my .htaccess file: RewriteEngine OnRewriteRule ^broadcasts/?$ broadcasts.php?action=view&page=1 The problem is that the browser is showing this when I visit /broadcasts: /broadcasts/?action=view&page=1 I am completely stumped because nothing like this has ever happened to me before. Any ideas or solutions? Link to comment Share on other sites More sharing options...
boen_robot Posted January 7, 2012 Share Posted January 7, 2012 Try to escape the "/", i.e. RewriteRule ^broadcasts\/?$ broadcasts.php?action=view&page=1 Link to comment Share on other sites More sharing options...
Fmdpa Posted January 8, 2012 Author Share Posted January 8, 2012 Good guess, I didn't catch that! However, I'm still having the problem. Erased everything else in the htaccess file (other than "RewriteEngine On") and it is still doing it. So it is not being caused by some other rule. I'm so confused.... Link to comment Share on other sites More sharing options...
boen_robot Posted January 8, 2012 Share Posted January 8, 2012 It still matches /broadcasts: ?I'm out of ideas for that one... but for the query string bit, you can deal with that with RewriteCond. According to the docs RewriteCond %{QUERY_STRING} ="" (i.e. apply the following rule only if the query string is empty)should be sufficient. Link to comment Share on other sites More sharing options...
Fmdpa Posted January 9, 2012 Author Share Posted January 9, 2012 Oddly, that doesn't do a thing! Maybe I'll just have to compromise and leave the query string showing like that. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.