Jump to content

Queer Rewriterule Problem


Fmdpa

Recommended Posts

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

Try to escape the "/", i.e.

RewriteRule ^broadcasts\/?$ broadcasts.php?action=view&page=1

Link to comment
Share on other sites

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...