webfr
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: htaccess mobile homepageThis 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 ^(.*)$ https://www.domain.com/mobile-url [L,R=301]
</IfModule>
# END Mobile redirectForum: Fixing WordPress
In reply to: htaccess mobile homepageForum: Fixing WordPress
In reply to: htaccess mobile homepageI 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 ??