Page 1 of 1

help required with Rewrite Rule

Posted: Mon Jan 25, 2010 5:54 am
by theboxinghistorian
Hi, I am trying to eliminate a folder from appearing in my URL. I done this months ago but no longer have the code.

Example
I am trying to eliminate the folder named "2009" from appearing in the URL. At the moment the path reads
http://www.theboxinghistorian.com/news/ ... -2010.html

I am looking for it to read.
http://www.theboxinghistorian.com/news/ ... -2010.html

As I said I had this working weeks ago but missplaced the code, I have been trying the following Rewrite rule

#Check inf the file exists in /news/2009.
RewriteCond%{DOCUMENT_ROOT}/news/2009/$09 -f
RewriteRule ^[^/]+\.html$ /news/2009/$0 [QSA.L]