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.

Particular url rewrite

September 11, 2012 11:44am

Subscribe [1]
  • #1 / Sep 11, 2012 11:44am

    vangogh

    4 posts

    Hi,
    For my new expression engine project I need to use a particular SEO structure:
    http://website.com/en/news/first-news
    News is the name of my channel and first-news the name of the entry.
    I want to use ‘en’ only to set a php session variable.
    Now, if I type this url my EE only shows me the homepage.

    I usually use this .htaccess file to remove index.php from the path

    RewriteEngine On
    
    # Removes index.php
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]

    Someone know a rule to add to the existing rewrite mode to solve my situation?

    Thanks,
    Lorenzo

     

  • #2 / Sep 12, 2012 3:23pm

    Dan Decker

    7338 posts

    Hi Lorenzo,

    Thanks for posting and welcome to the ExpressionEngine forums!

    I don’t think the answer is going to be in .htaccess.

    You can get ExpressionEngine to work around the default routing with some conditionals, but that can get really complex. There are some add-ons that can help you keep your sanity:
    Structure
    Transcribe
    Freebie
    Router

    I’d love to hear some details about what you need to do! I’m sure there are other options I’m not considering.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases