ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Subdomain and paging trouble?

August 16, 2010 10:27am

Subscribe [6]
  • #1 / Aug 16, 2010 10:27am

    ee_sa

    56 posts

    Hi,

    I created subdomain for mobile phones like: m.domain.com based on this article.

    Template group named “mobile” and folder for subdomain is “m”.

    But if I try to use pagination I’m getting wrong links like:
    http://m.domain.com/mobile/P20

    How to remove mobile template group from paging?

    Thanks in advance

  • #2 / Aug 16, 2010 11:56am

    carvingCode

    380 posts

    You can’t do this via .htaccess.  It has to be done dynamically with one of the search/replace plugins.  I used “low_replace” for this.  Don’t have the link, but it’s easy to find.

    Hope this helps.

    Might be something for the devs to consider adding; pagination is a key component to a lot of sites.

  • #3 / Aug 16, 2010 12:33pm

    ee_sa

    56 posts

    I replaced mobile/ with nothing, and added redirect to “index.php/mobile/” in htaccess, but now I have weird problem :\

    When I open home http://m.domain.com everything is OK.
    Then I click on any pagination link, list of entries is changed properly, but then pagination links are like:
    http://m.domain.com/m/P10/

    Where this “m” is coming from?! I’m confused

  • #4 / Aug 16, 2010 12:39pm

    carvingCode

    380 posts

    Hmm… don’t know where the ‘m/’ is coming from.  May need the Tech Support Pros to weight in on this.  Glad the replace worked for you though.

  • #5 / Aug 16, 2010 12:46pm

    ee_sa

    56 posts

    Hmm… don’t know where the ‘m/’ is coming from.  May need the Tech Support Pros to weight in on this.  Glad the replace worked for you though.

    Sorry forgot to say thanks 😊

  • #6 / Aug 16, 2010 8:08pm

    Brandon Jones

    5500 posts

    ee_sa,

    I’d suggest getting this working without URL rewriting first, as we cannot support that.

  • #7 / Aug 17, 2010 1:08pm

    ee_sa

    56 posts

    ee_sa,

    I’d suggest getting this working without URL rewriting first, as we cannot support that.

    OK, I removed everything, and now I have “mobile” in every link that is created from EE.
    Here is my path.php file:

    // ------------------------------------------------------
    // DO NOT ALTER THIS FILE UNLESS YOU HAVE A REASON TO
    
    // ------------------------------------------------------
    // Path to the directory containing your backend files
    
    $system_path = "../system/";
    
    // ------------------------------------------------------
    // MANUALLY CONFIGURABLE VARIABLES
    // See user guide for more information
    // ------------------------------------------------------
    
    $template_group = "mobile";
    $template = "index";
    $site_url = "http://m.domain.com/";
    $site_index = "";
    $site_404 = "";
    $global_vars = array(); // This array must be associative

    So, paging creates links like:

    // Home page paging
    <a href="http://m.domain.com/mobile/P20">http://m.domain.com/mobile/P20</a> 
    
    // Comment form
    <form id='comment_form' method="post" action="http://m.domain.com/mobile/entry/url_title/" >

    As I’m going far, I’m discovering new troubles with links generated from EE on subdomain.

    Please, I cant finish this one with this problems :(
    Thanks

  • #8 / Aug 17, 2010 4:23pm

    Ingmar

    29245 posts

    You are using $template_group = “mobile”; in your file which explicitly instructs EE to include that template group. If that is not the desired beahvior try to leave it blank.

  • #9 / Aug 17, 2010 5:34pm

    ee_sa

    56 posts

    Thanks for suggestion, but I’m using this based on this article: http://expressionengine.com/wiki/Running_Multiple_Domains_or_Subdomains_or_Subsites/

    Its subdomain, I dont know other way to “tell” EE to load that template group on subdomain: http://m.domain.com

    Is there any other way?

    Thanks one more time

  • #10 / Aug 18, 2010 10:21am

    Sue Crocker

    26054 posts

    You’d need to use the MSM to have a supported solution. Does that help?

  • #11 / Aug 18, 2010 5:03pm

    ee_sa

    56 posts

    You’d need to use the MSM to have a supported solution. Does that help?

    Actually no!
    This does not help me. I dont need “second” site I only want to show same content which I already have, and thats all based on licence which I bought.
    If Wiki content isnt supported, sorry but I didnt know.

    But… never mind, You are to ironic :\

  • #12 / Aug 19, 2010 3:46am

    John Henry Donovan

    12339 posts

    ee_sa,

    When I open home http://m.domain.com everything is OK.
    Then I click on any pagination link, list of entries is changed properly, but then pagination links are like:
    http://m.domain.com/m/P10/

    Where this “m” is coming from?! I’m confused

    To confirm is this still the issue?
    Can you paste in your template code with you are using the find and replace tags?

    Have you seen Erskine’s article for creating an alternative version of your site?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases