1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Can't get Friendly URLs to work

Discussion in 'Troubleshooting and Problems' started by cheracc, Apr 4, 2016.

  1. cheracc

    cheracc Member

    I am using apache2 and XenForo 1.5.6. Everything is working fine in my installation except I can't get Friendly URLs to work.

    Here's my modules in apache2:

    var/www $ apache2ctl -M
    Loaded Modules:
    core_module (static)
    so_module (static)
    watchdog_module (static)
    http_module (static)
    log_config_module (static)
    logio_module (static)
    version_module (static)
    unixd_module (static)
    access_compat_module (shared)
    alias_module (shared)
    auth_basic_module (shared)
    authn_core_module (shared)
    authn_file_module (shared)
    authz_core_module (shared)
    authz_host_module (shared)
    authz_user_module (shared)
    autoindex_module (shared)
    deflate_module (shared)
    dir_module (shared)
    env_module (shared)
    filter_module (shared)
    mime_module (shared)
    mpm_prefork_module (shared)
    negotiation_module (shared)
    php5_module (shared)
    rewrite_module (shared)
    setenvif_module (shared)
    status_module (shared)
    Here is my .htaccess file (it's the default copied from htaccess.txt):

    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 405 default
    ErrorDocument 406 default
    ErrorDocument 500 default
    ErrorDocument 501 default
    ErrorDocument 503 default
    <IfModule mod_rewrite.c>
        RewriteEngine On
        #   If you are having problems with the rewrite rules, remove the "#" from the
        #   line that begins "RewriteBase" below. You will also have to change the path
        #   of the rewrite to reflect the path to your XenForo installation.
        RewriteBase /
        #   This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    If you need any other info about my config, let me know as I would really like to get this working properly.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Are the friendly URLs giving 404 errors? In that case here are some possible explanations:

    1) The .htaccess file is not in place in your forum directory.

    2) Sometimes you need to specify RewriteBase in your .htaccess file (specify the name of your forum directory):

    RewriteBase /xenforo

    3) Your server doesn't have mod_rewrite installed.

    4) Your server doesn't have AllowOverride enabled:

  3. cheracc

    cheracc Member

  4. Brogan

    Brogan XenForo Moderator Staff Member

    It does: https://xenforo.com/help/friendly-urls/
  5. cheracc

    cheracc Member

    My mistake. I guess I just wanted it spelled out for me a little more clearly, with a configuration example. Thank you for the help.

Share This Page