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 with access url

December 12, 2013 7:09pm

Subscribe [2]
  • #1 / Dec 12, 2013 7:09pm

    Eric S.

    3 posts

    I am having issues with .htaccess rewrite and a access url. The site is on a LAMP server and the domain name is not pointing to it yet. That means the domain name is in the form:

    http://servername.com/~username/

    rather than:

    http://www.domain.com/

    If I disable the htaccess file by renaming it and making the index.php my index file in general settings then it works (with the domain name).
    http://servername.com/~username/index.php/thePage/

    My redirect code is the “standard”:

    <IfModule mod_rewrite.c>
          RewriteEngine On
          RewriteBase /

          # Removes index.php from ExpressionEngine URLs
          RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
          RewriteCond %{REQUEST_URI} !/renamedsystenfolder/.* [NC]
          RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

          # Directs all EE web requests through the site index file
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^(.*)$ /index.php/$1 [L]
    </IfModule>

    Since the pages serve when I disable the htaccess file and name my index file I assume it is the rewrite.

    Can someone help with a rewrite for access url?

    EE version is 2.3.1 - I will upgrade after I get it working correctly.

  • #2 / Dec 20, 2013 12:44am

    Rob Allen

    3114 posts

    I’m no .htaccess expert but it may be something server side that’s preventing it working, I’ve also found the same when working on that sort of domain name.

    My solution is to develop the site without .htaccess, and only add it when the real domain has been mapped to the site.

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

ExpressionEngine News!

#eecms, #events, #releases