Search the Community
Showing results for tags 'www'.
-
For best practice best-of-scotland.co.uk redirects to www.best-of-scotland.co.uk and this was done by adding these lines to the core htaccess file: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] However, we also have a mobile site working on a parked domain using this method: index.php has the following lines changed to make sure the site directory is hard coded instead on a variable $config->urls->siteModules = "site/modules/"; $assetsDir = "site/assets"; $config->urls->adminTemplates = is_dir("site/$adminTplDir") ? "site/$adminTplDir/" : "$wireDir/$adminTplDir/"; I copied index.config.php from wire to the root and added these line: function ProcessWireHostSiteConfig() { return array( 'mobile.best-of-scotland.co.uk' => 'site-mobile', 'best-of-scotland.co.uk' => 'site', 'www.best-of-scotland.co.uk' => 'site', ); } The problem is that I can't get the two to work together. If I remove the www redirect from the htaccess file the mobile site works. Adding it in stops it working. Can anyone help here please? Or is there a better method for delivering mobile sites? Thanks Mike