[Ask] rewrite or internal redirection cycle while internally redirecting

Discussion in 'General' started by m4l41k4t, Mar 4, 2016.

  1. m4l41k4t

    m4l41k4t Member

    Hi

    I am currently using:
    OS: Centos 7 64
    ISPConfig Version: 3.0.5.4p8
    nginx web server
    CMS Web : Joomla! 3.2.3
    I'm having problems to redirect, when I enable Search Engine Friendly URLs (SEF), I can not access my web page with the following error
    500 Internal Server Error
    and following log from tail -f /var/log/ispconfig/httpd/mydomain.com/error.log
    :
    how to fix it ?


    Regards,
     
  2. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    disable custom error pages for your domain configuration in ISPconfig. If that doesn't solve the issue, we'd probably need to take a look at your .htaccess file. Any custom http-modifications at ISPConfig for that domain?
     
  3. m4l41k4t

    m4l41k4t Member

    What do you mean is Own Error-Documents ?
    if Own Error-Documents not active display error to be
    404 Not Found
    and log :
    I do not use .htaccess
     
  4. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    you want www.mydomain.com/testing/ where the folder .../web/testing/ does not exists because Joomla should handle it to route it to some internal site.

    Therefore you need mod_rewrite, therefore you need .htaccess

    Code:
    #
    #  mod_rewrite in use
    
    RewriteEngine On
    
    
    #  Uncomment following line if your webserver's URL
    #  is not directly related to physical file paths.
    #  Update Your Joomla/MamboDirectory (just / for root)
    
     RewriteBase /
    
    
    ########## Begin - Joomla! core SEF Section
    ############# Use this section if using ONLY Joomla! core SEF
    ## ALL (RewriteCond) lines in this section are only required if you actually
    ## have directories named 'content' or 'component' on your server
    ## If you do not have directories with these names, comment them out.
    #
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] 		##optional - see notes##
    RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
    RewriteRule ^(content/|component/) index.php
    #
    ########## End - Joomla! core SEF Section
    
    

    And that's just part of joomlas default .htaccess
     
  5. m4l41k4t

    m4l41k4t Member

    previously I have tried but the result is the same,
    btw, .htaccess can running in nginx?, I don't think so
     
  6. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    doh, nope no htacess / mod_rewrite on nginx like on apache, you need to convert the rules.
    Code:
            root PATH_ON_SERVER;
            index index.php index.html index.htm default.html default.htm;
            # Support Clean (aka Search Engine Friendly) URLs
            location / {
                    try_files $uri $uri/ /index.php?$args;
            }
    
    
    As per joomla documentation
     
    m4l41k4t likes this.
  7. m4l41k4t

    m4l41k4t Member

Share This Page