Redirect Static Caching - Internet Explorer >= 11

Hi,

I’m using the Full Static Caching Strategie for my site, and I need to create a redirect for IE Browser. Basically, user will be redirect to another page when visiting the site from an outdated browser like IE.

First I added the Static Caching redirection in my .htaccess provide by the Statamic documentation.

RewriteCond %{DOCUMENT_ROOT}/static/%{REQUEST_URI}_%{QUERY_STRING}\.html -s
RewriteCond %{REQUEST_METHOD} GET
RewriteRule .* static/%{REQUEST_URI}_%{QUERY_STRING}\.html [L,T=text/html]

Now the tricky part.

I setup the new route/template/layout. https:/my-site.com/browser

So if I type /browser in the url the page is working great.

Now I need to redirect to that page from the .htaccess because I use Static Caching.

I tried this solution, but without success.

    RewriteCond %{HTTP_USER_AGENT} (MSIE|Trident) 
    RewriteRule .* static/browser_\.html [L,T=text/html]

I also tried this one.

    RewriteCond %{HTTP_USER_AGENT} (MSIE|Trident) 
    RewriteRule ^(.*)$ https://my-site.com/browser

For this one, the redirect was working, but all assets like css,js,images where also a 302 redirect. The page was just a black and white html file.

Maybe someone better with the .htaccess know the solution.

Thanks, Simon

>>>>>>> Unanswered <<<<<<<
0 Replies
1 Follower