mod_rewrite filename from mod_pagespeed back to normal files
- by British Sea Turtle
I am hoping someone can help me with this problem. I am moving to a new server and not using mod_pagespeed any more. However we have lots of external links to images on our site using the strange mod_pagespeed filenames. This is not an issue but we do not want to have lots of 404 errors.
So I have lots of links like the following :
http://www.domain.com/images/150x150xlink.png.pagespeed.ic.pPXw45HSQm.png
http://www.domain.com/images/paris_01.gif.pagespeed.ce.vfrkuKUaj0.gif
http://www.doamin.com/images/1st2.gif.pagespeed.ce.OUg38q6VbZ.gif
How can I redirect them to :
http://www.domain.com/images/150x150xlink.png
http://www.domain.com/images/paris_01.gif
http://www.doamin.com/images/1st2.gif
There are thousands of files like this so I am hoping for a simple solution with mod_rewrite, I tried this but it does not work. So any help would be appreciated.
RewriteCond %{REQUEST_URI} \.gif\.pagespeed\. [NC]
RewriteRule ^(.*?\.gif)\..*\.gif$ $1 [NC,L]