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.

URL Rewrite

September 11, 2011 3:14pm

Subscribe [5]
  • #1 / Sep 11, 2011 3:14pm

    tetragram

    6 posts

    Hey Guys,

    Having an issues with my rewrite rule.
    I was able to remove index.php with the following htacess


    _____________________________

    AcceptPathInfo On

    Options -Indexes

    <IfModule mod_rewrite.c>
    RewriteEngine On

    # Looks for files and directories that do not exist
    # and provide the segments to the index.php file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond $1 !^/index.php
    RewriteCond $1 !.(css|js|png|jpe?g|gif|ico)$ [NC]
    RewriteRule ^(.+)$ index.php/$1 [L]
    </IfModule>

    _____________________________

    I removed index.php from my admin > general configuration

    but it my links results appear like this.

    http://www.site.com/?/page

    My question is how do i removed the “?”

    Thanks

    Im on EE V 2.2.2

  • #2 / Sep 11, 2011 3:42pm

    LMO

    203 posts

    Hello,

    Add this to the top of your index.php file and view the page that you are having the problem with and post the results please. This will tell us if the problem is with the rewrite or EE.

    <?php
    echo "QUERY_STRING - {$_SERVER['QUERY_STRING']}
    ";
    echo "REQUEST_URI - {$_SERVER['REQUEST_URI']}
    ";
    echo "SCRIPT_NAME - {$_SERVER['SCRIPT_NAME']}
    ";
    echo "PHP_SELF - {$_SERVER['PHP_SELF']}
    ";
    exit;
    ?>
  • #3 / Sep 11, 2011 4:00pm

    tetragram

    6 posts

    This is what Im getting

    QUERY_STRING - /services
    REQUEST_URI - /?/services
    SCRIPT_NAME - /index.php
    PHP_SELF - /index.php

  • #4 / Sep 11, 2011 9:18pm

    Sue Crocker

    26054 posts

    Thanks for the assist, VIM International.
    tetragram - It sounds like you need to make a minor change to your .htaccess file -

    See this page: http://ellislab.com/expressionengine/user-guide/general/remove_index.php.html

    You’d want to use the advice here:

    # If 404s, “No Input File” or every URL returns the same thing # make it /index.php?/$1 above (add the question mark)

    Does that help?

  • #5 / Sep 11, 2011 9:23pm

    LMO

    203 posts

    Sorry I think I may have read the 1st post wrong. The problem is EE is adding the ? to the links. Check the path settings in channel preferences as well as the global config.

  • #6 / Sep 12, 2011 11:10pm

    Kevin Smith

    4784 posts

    Hey tetragram,

    Just checking in to get an update on your progress. Still struggling with this?

  • #7 / Sep 13, 2011 12:17am

    tetragram

    6 posts

    Hey Guys,

    Thanks for all the help.
    Just updated my htaccess and its working fine.

  • #8 / Sep 13, 2011 3:53am

    John Henry Donovan

    12339 posts

    Glad you are up and running again. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases