We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Subdomain (mobile) internal pages send a 404 error

Development and Programming

melonian's avatar
melonian
37 posts
13 years ago
melonian's avatar melonian

Hi guys,

I’ve searched on the forum but found little on this (quite a bit on mobile development, but nothing on this particular issue).

A client of mine has finally agreed to go mobile (still hasn’t agreed to upgrade his Expression Engine, though).

For particular reasons of budget and content we’ve decided to go with a dedicated mobile web instead of a responsive design, using the subdomain m.website.com

I followed this approach: http://erskinelabs.com/create-an-alternative-version-of-your-expressionengine-website/ And I’m using MX Mobile Device Detect plugin (http://devot-ee.com/add-ons/mx-mobile-device-detect)

I’ve managed to make it work on the landing page…so www.website.com and m.website.com work properly, and deliver the information I want differently for each device.

However, when I go for internal pages, on the mobile subdomain I get a 404 error…I still reach the database (weblog info is still fetched), but for some reason the pages themselves are not fetched.

I’m trying anything I can, but haven’t been able to fix it this. Any pointers???

We’re running EE 1.6.8, Build20090723.

The path.php file has the following code….

<?php

// ------------------------------------------------------
// DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO

// ------------------------------------------------------
// Path to the directory containing your backend files

$system_path = "/home/client/public_html/system/";

// ------------------------------------------------------
// MANUALLY CONFIGURABLE VARIABLES
// See user guide for more information
// ------------------------------------------------------

$template_group = "";
$template = "";
$site_url = "http://m.website.com/";
$site_index = "";
$site_404 = "";
$global_vars = array(); // This array must be associative
$global_vars['version_dispositivo'] = 'movil';
$global_vars['media_url'] = 'http://www.website.com/img/';
?>

Any help?

Thanks in advance!

Raul

       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
13 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

Do you have any URL re-writing occurring on the main (desktop) site that isn’t occurring (but should) on the mobile site?

       
melonian's avatar
melonian
37 posts
13 years ago
melonian's avatar melonian

Hi Erik,

I do have a redirect to keep both http://www. and http:// as one site and not two, plus the one to take out the index.php.

Here’s my .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^utm_medium
RewriteCond %{REQUEST_URI} ^/$ [NC]
RewriteRule (.*) /index.php?/site/index/&%{QUERY_STRING} [L]
RewriteCond %{QUERY_STRING} ^utm_medium
RewriteCond %{REQUEST_URI} ^/catalogo/$ [NC]
RewriteRule (.*) /index.php?/site/catalogo/&%{QUERY_STRING} [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteRule ^(.*)$ /index.php?$1 [L]
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]  
</IfModule>

But that shouldn’t give problems to trigger 404 errors, right? Any ideas?

Thanks in advance for all the help =)

Raul

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.