Forum Moderators: phranque

Message Too Old, No Replies

Redirect for different browser

want to redirect when using firefox

         

sparky111

1:26 am on Sep 23, 2008 (gmt 0)

10+ Year Member



Here is my problem. I noticed that one of my sites looks extremely bad when viewed in firefox, as it dont seem to read the css the same as IE. Is there an .htaccess code that would redirect firefox users to a different page , or site?

Thanks in advance!

phranque

1:48 am on Sep 23, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



there is an example in the apache docs of using the RewriteCond directive and the HTTP_USER_AGENT environment variable [httpd.apache.org] to do exactly this.

encyclo

1:54 am on Sep 23, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld sparky111. Whilst the answer above it correct in saying that you can do this with a .htaccess, it is a very bad solution to your problem. The real solution is to fix your CSS so that the layout works in all major browsers. Try our CSS forum [webmasterworld.com] for starters. :)

Redirecting for specific browsers never works long-term, as you are forced to constantly update your redirects for new iterations of each browser.

phranque

2:24 am on Sep 23, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



in the meantime, you can use the above technique to test your changes on firefox-only by serving a different css file to those visitors without breaking things for others.

oh, and sorry i missed the welcome to WebmasterWorld [webmasterworld.com]!