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.

.htaccess rewrite issue

January 15, 2014 12:09pm

Subscribe [1]
  • #1 / Jan 15, 2014 12:09pm

    chrigu

    21 posts

    I had do move a functionally old EE 1.6.8 website to a new hosting. It does working so far after I changed the RewriteCond from:

    RewriteEngine On
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]

    to:

    RewriteEngine On
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]


    It seem’s my new Host requires forced query strings.

    But now there are problems to fetching superglobal values in a specific template.
    I use the following code to catch three values from the URI there:

    URI:

    <a href="http://www.nanotronic.ch/kontakt/projectform?mitarbeiter=test&projekt=test&kunde=test">http://www.nanotronic.ch/kontakt/projectform?mitarbeiter=test&projekt=test&kunde=test</a>

    Template code:

    <?php
    
    function get_id($idname) {
    
      global $IN;
     
      $id = $IN->GBL($idname, 'GET');
      echo $id;
    
    }
    
    ?>
    
    {assign_variable:mitarbeiter="<?php echo get_id('mitarbeiter'); ?>"}
    {assign_variable:projekt="<?php echo get_id('projekt'); ?>"}
    {assign_variable:kunde="<?php echo get_id('kunde'); ?>"}
    
    {mitarbeiter}
    {projekt}
    {kunde}

    They were all catched on the old hosting, as well when I run the EE with no or clear .htaccess file. I’m not very well expierenced in writing .htaccess files but could be made an exception rule for this template?

    Thanks for any hints or advices!

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

ExpressionEngine News!

#eecms, #events, #releases