.htaccess or similar alternative...
- Started
- Last post
- 8 Responses
- vaxorcist0
you may have to do it with and without the www
tryprint $pageURL
to figure out what to expect....
- lukus_W0
Post your current .htaccess file in a pastebin.
- gabe0
problem resolved...thank you all very much for your help
- instrmntl0
post ur solution!
- utopian0
I just have been working on some redirects for an iPhone & iPad version websites, here is what I have been using:
---
RewriteEngine On
RewriteBase /RewriteCond %{HTTP_USER_AGENT} ^.*ipad.*$ [NC]
RewriteRule ^$ http://www.yourwebsite.com/ipad [R,L]
RewriteCond %{HTTP_USER_AGENT} android|avantgo|blackberry|blaze... |maemo|midp|mmp|mobile|o2|opera\ mini|palm(\ os)?|plucker|pocket|pre\/|psp|sm... ce;\ (iemobile|ppc)|xiino [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(1207|6310|6590|3gso|4thp|50[1... wa|abac|ac(er|oo|s\-)|ai(ko|rn... |s\ )|avan|be(ck|ll|nq)|bi(lb|rd)|bl... u|g560|gene|gf\-5|g\-mo|go(\.w|o... i|ip)|hs\-c|ht(c(\-|\ |_|a|g|p|s|t)|tp)|hu(aw|tc)|i... |\-|\/)|ibro|idea|ig01|ikom|im1k... |\/)|klon|kpt\ |kwc\-|kyo(c|k)|le(no|xi)|lg(\ g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w... |o|v)|zz)|mt(50|p1|v\ )|mwbp|mywa|n10[0-2]|n20[2-3]|n3... )|sy(01|mb)|t2(18|50)|t6(00|10|1... )|webc|whit|wi(g\ |nc|nw)|wmlb|wonu|x700|xda(\-|2... [NC]
RewriteRule ^$ http://www.yourwebsite.com/mobil… [R,L]
- vaxorcist0
or you could tweek the index.php like this:
copy index.php to index2.php
then write a small index.php file like this:
<?php
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];// edit the URL below to whatever you want for your splash-index
if($pageURL !="http://www.me.com/mysite/"){
include("index2.php);
}else{
include("splash.php");
}
exit;
?>
- gabe0
thanks for the input vaxorcist, i'll give that a shot now