Title: webfr's Replies | WordPress.org

---

# webfr

  [  ](https://wordpress.org/support/users/webfr/)

 *   [Profile](https://wordpress.org/support/users/webfr/)
 *   [Topics Started](https://wordpress.org/support/users/webfr/topics/)
 *   [Replies Created](https://wordpress.org/support/users/webfr/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/webfr/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/webfr/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/webfr/engagements/)
 *   [Favorites](https://wordpress.org/support/users/webfr/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [htaccess mobile homepage](https://wordpress.org/support/topic/htaccess-mobile-homepage/)
 *  Thread Starter [webfr](https://wordpress.org/support/users/webfr/)
 * (@webfr)
 * [10 years ago](https://wordpress.org/support/topic/htaccess-mobile-homepage/#post-7294161)
 * This was the solution:
 * # BEGIN Mobile redirect
    <IfModule mod_rewrite.c> RewriteEngine on RewriteCond%{
   HTTP_USER_AGENT} “android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos
   |webos|googlebot-mobile” [NC] RewriteCond %{HTTP_HOST} domain\.com [NC] RewriteCond%{
   REQUEST_URI} ^/$ Rewriterule ^(.*)$ [http://www.domain.com/mobile-url](http://www.domain.com/mobile-url)[
   L,R=301] </IfModule> # END Mobile redirect
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [htaccess mobile homepage](https://wordpress.org/support/topic/htaccess-mobile-homepage/)
 *  Thread Starter [webfr](https://wordpress.org/support/users/webfr/)
 * (@webfr)
 * [10 years ago](https://wordpress.org/support/topic/htaccess-mobile-homepage/#post-7294147)
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [htaccess mobile homepage](https://wordpress.org/support/topic/htaccess-mobile-homepage/)
 *  Thread Starter [webfr](https://wordpress.org/support/users/webfr/)
 * (@webfr)
 * [10 years ago](https://wordpress.org/support/topic/htaccess-mobile-homepage/#post-7294146)
 * I am currently using the same javascript solution, but this implicates a speed
   loss due to all the loading that happens before the script is executed. In my
   case the redirect is for homepage only so the choices are 2: or you put it in
   the body section of the page you need it on, or in the head after wordpress recognizes
   the page its on to determine if its the one you want to redirect. In both cases
   data is loaded before this happens and seconds of loading time are lost. Since
   its the hompage speed is very important and this is not the best solution.
 * As for the css solution, since the mobile and desktop homepages load alot of 
   different content, having all loaded and only part of it displayed for each makes
   the page too havy and filled with too much javascript loaded wich ends wich a
   slower user experience. (the css method is used in all other pages of site tho)
 * You can reidrect mobile by htaccess file before anything loads, detecting mobile
   user_agents and redirecting specific urls.
 * This is the fastest option and does not interfere with any caching system (which
   gave me problems with other option im not gonna illustrate like several plugins)
   
   I just cant find the right code for it and I hope someone can help me out here.
 * I really appreciate you intent to help me tho.
 * Thanks 🙂

Viewing 3 replies - 1 through 3 (of 3 total)