0

I have a website called

www.website.com

I have a mobile website called

m.website.com (m is a subdomanin of website.com)

I have done the redirect to mobile with the help of @tim-stone answer from here: Mobile Redirect using htaccess

I want to use an htaccess rule to rewrite pics url because now the pics url are like this:

m.website.com/pics/thumb/pic.jpg and are not visible from mobile device.

So how can I add an exception in .htaccess to not rewrite all the urls that are like: www.website.com/pics/* in the www.website.com .htaccess file OR a rule to rewrite all m.website.com/pics/* to www.website.com/pics/* in the m.website.com .htaccess file (so the pics will pe visible)

Community
  • 1
  • 1
nickRO87
  • 103
  • 3
  • 8

1 Answers1

0

Put a RewriteCond before the RewriteRule that does rewrite the URLS, and exclude the image extensions. This is what I use:

RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png)
bloodyKnuckles
  • 11,551
  • 3
  • 29
  • 37