Results 1 to 3 of 3

Thread: Problem with referer/links in backend - htaccess problem (?)

  1. #1
    New user
    Join Date
    11-08-12.
    Posts
    2

    Default Problem with referer/links in backend - htaccess problem (?)

    Hi all,
    I have problem with settings of my Contao instance respectively with referer links in backend. My Contao instance is installed in subdirectory (representing domain of 3rd level).

    My domain: http:\\www.domain.com is in directory \www\
    My subdomain: http:\\lukas.domain.com is in directory \www\subdom\lukas\

    All links in backend are directing e.i.: http://lukas.domain.com/subdom/lukas/contao/main.php?...
    I need to setup links to: http://lukas.domain.com/contao/main.php?... (withou subdom/lukas)

    I have in root of my web (\www\) following .htaccess file content:
    Code:
    RewriteEngine On
    
    RewriteCond %{REQUEST_URI} !^domains/
    RewriteCond %{REQUEST_URI} !^/domains/
    RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$
    RewriteCond %{DOCUMENT_ROOT}/domains/%2 -d
    RewriteRule (.*) domains/%2/$1 [DPI]
    
    RewriteCond %{REQUEST_URI} !^subdom/
    RewriteCond %{REQUEST_URI} !^/subdom/
    RewriteCond %{HTTP_HOST} ^(www\.)?(.*)\.([^\.]*)\.([^\.]*)$
    RewriteCond %{DOCUMENT_ROOT}/subdom/%2 -d
    RewriteRule (.*) subdom/%2/$1 [DPI]
    
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^domains/[^/]+/(.+[^/])$ /$1/ [R]
    
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^subdom/[^/]+/(.+[^/])$ /$1/ [R]
    I need to resolve this problem due wrong refering page in backend. When I am clicking on Save and go back or Go back backend will redirect my to wrong link (non existing) and default page is shown.

    Can you anybody help my what is wrong set on my hosting/.htaccess file?

    Thanks Lukas

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default Re: Problem with referer/links in backend - htaccess problem

    Start your install tool in
    http://lukas.domain.com/contao/install.php
    not in
    http://lukas.domain.com/subdom/lukas/contao/install.php

    Set the website path in system/localconfig.php to ''
    Code:
    $GLOBALS['TL_CONFIG']['websitePath'] = '';
    Open your backend here
    http://lukas.domain.com/contao/
    not here
    http://lukas.domain.com/subdom/lukas/contao/

    Your FE is here
    http://lukas.domain.com/

    Don't manipulate the .htaccess file, simply use .htaccess.default by renaming it.
    Set a 301 redirect for your www subdomains in your server account. Direct to the domain, not to the folder.
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

  3. #3
    New user
    Join Date
    11-08-12.
    Posts
    2

    Default Re: Problem with referer/links in backend - htaccess problem

    Thanks Andreas,
    I found problem with .htaccess file. I removed line:
    Code:
    RewriteBase /

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •