views:

30

answers:

1

I'm probably being completely thick here but I can't seem to make an optional trailing slash work in my url rewriting

I've seen Gumbos comment about excluding the file you are rewriting to exclude infinite recursion, but still having no joy.

So for example I have this:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/index\.php$
RewriteRule ^news/([0-9]{4})/?$ index.php?id=news&year=$1 [NC,QSA]

And with that the url http://mydomain.com/news/2010 works but with the trailing slash http://mydomain.com/news/2010/ I just get a blank page (no 404 though?)

As I said I'm probably making some shcoolboy error, so somebody please put me out of misery

A: 

Ignore me there was nothing wrong with my rewriting it was an error somewhere else, apologies for wasting anyones time!

Del