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

Server Issue Friendly url not working (base tag issues)

Discussion in 'Resolved Bug Reports' started by Andy.N, Oct 6, 2010.

  1. Andy.N

    Andy.N Well-Known Member

    HydraulicJack likes this.
  2. Blandt

    Blandt Well-Known Member

    Set the domain name.

    It will not work on your IP
     
  3. Andy.N

    Andy.N Well-Known Member

    It should work with the IP. Why not?
     
    HydraulicJack likes this.
  4. Mike

    Mike XenForo Developer Staff Member

    I'm moving this to bugs. It's setting the base tag completely differently for some reason.
     
    HydraulicJack likes this.
  5. Andy.N

    Andy.N Well-Known Member

    Thanks for confirming this, Mike. I'm watching this bug.
     
    HydraulicJack likes this.
  6. boban

    boban Well-Known Member

    I having the same issue.
     
  7. Mike

    Mike XenForo Developer Staff Member

    I've attached a test script. You will likely need to rename it to index.php to really test it as it only happens in one situation (the / rather than /index.php). You'll have to rename the existing index.php, obviously.

    With the test.php version of index.php in place, access <url>/ and <url>/index.php and provide the output here please. :)
     

    Attached Files:

    • test.php
      File size:
      596 bytes
      Views:
      16
  8. Andy.N

    Andy.N Well-Known Member

    Thanks for the script. Here is my output
    <url>/index.php
    Base URL: /~quantnet/forum/index.php
    Base Path: /~quantnet/forum
    Path Info:
    Request URI: /~quantnet/forum/index.php
    array(6) { ["basePath"] => string(17) "/~quantnet/forum/"
    ["host"] => string(14) "98.158.182.140"
    ["protocol"] => string(4) "http"
    ["fullBasePath"] => string(38) "http://98.158.182.140/~quantnet/forum/"
    ["requestUri"] => string(26) "/~quantnet/forum/index.php"
    ["fullUri"] => string(47) "http://98.158.182.140/~quantnet/forum/index.php" }

    Here is output
    <url>/
    Base URL:
    Base Path:
    Path Info: /~quantnet/forum/
    Request URI: /~quantnet/forum/
    array(6) { ["basePath"] => string(1) "/"
    ["host"] => string(14) "98.158.182.140"
    ["protocol"] => string(4) "http"
    ["fullBasePath"] => string(22) "http://98.158.182.140/"
    ["requestUri"] => string(17) "/~quantnet/forum/"
    ["fullUri"] => string(38) "http://98.158.182.140/~quantnet/forum/" }
     
  9. Mike

    Mike XenForo Developer Staff Member

    Wow that's weird. Do you know your server setup? Apache? PHP as CGI or Apache module?
     
  10. Mike

    Mike XenForo Developer Staff Member

    Ahh actually this is probably where RewriteBase is needed. What happens if you put this in the .htaccess file, after the "RewriteEngine On" line:

    RewriteBase /~quantnet/forum/
     
  11. Andy.N

    Andy.N Well-Known Member

    Mike,
    I run liteSpeed instead of Apache. I put up the phpinfo for you here
    http://98.158.182.140/~quantnet/phpinfo.php
     
    Forsaken likes this.
  12. Andy.N

    Andy.N Well-Known Member

    Mike,

    It's a no go

    Here is my .htaccess content in the /forum folder

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /~quantnet/forum/
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    </IfModule>
     
  13. Mike

    Mike XenForo Developer Staff Member

  14. Andy.N

    Andy.N Well-Known Member

    Hum,
    Looks like I'm getting another reason to move to nginx.
     
  15. Blandt

    Blandt Well-Known Member

    Do it now :D
     
  16. Andy.N

    Andy.N Well-Known Member

    Did.
    Installed 0.8.52 like an hour ago so now I have Apache, LiteSpeed, Nginx. I'll send you a msg on how to proceed next. ;)
     
    Blandt likes this.
  17. Blandt

    Blandt Well-Known Member

    Do you have them all running on the same machine ?:eek:
     
  18. boban

    boban Well-Known Member

    I have two copies of xf installed on the same machine, same web server (Apache version 2.2.3 )
    One is on IP address and another one on domain name (second IP address).
    No problem with SEO on domain name but no luck on the other one :)


    SEO http://www.beke.co.nz/xforum/forums/objave.6/ OK
    http://www.beke.co.nz/xforum/index.php?forums/objave.6/ OK


    http://206.123.115.165/xforum/index.php?forums/objave.6/ OK
    SEO http://206.123.115.165/xforum/forums/objave.6/ Not Found


    htaccess is same:

    <IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data|js|styles|install) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    </IfModule>



    test.php

    IP address



    <url>/index.php

    Base URL: /xforum/index.php
    Base Path: /xforum
    Path Info:
    Request URI: /xforum/index.php

    array(6) {
    ["basePath"] => string(8) "/xforum/"
    ["host"] => string(15) "206.123.115.165"
    ["protocol"] => string(4) "http"
    ["fullBasePath"] => string(30) "http://206.123.115.165/xforum/"
    ["requestUri"] => string(17) "/xforum/index.php"
    ["fullUri"] => string(39) "http://206.123.115.165/xforum/index.php"
    }

    <url>/
    Base URL: /xforum
    Base Path: /xforum
    Path Info: /
    Request URI: /xforum/

    array(6) {
    ["basePath"] => string(8) "/xforum/"
    ["host"] => string(15) "206.123.115.165"
    ["protocol"] => string(4) "http"
    ["fullBasePath"] => string(30) "http://206.123.115.165/xforum/"
    ["requestUri"] => string(8) "/xforum/"
    ["fullUri"] => string(30) "http://206.123.115.165/xforum/"
    }


    Domain name

    <url>/index.php

    Base URL: /xforum/index.php
    Base Path: /xforum
    Path Info:
    Request URI: /xforum/index.php

    array(6) {
    ["basePath"] => string(8) "/xforum/"
    ["host"] => string(14) "www.beke.co.nz"
    ["protocol"] => string(4) "http"
    ["fullBasePath"] => string(29) "http://www.beke.co.nz/xforum/"
    ["requestUri"] => string(17) "/xforum/index.php"
    ["fullUri"] => string(38) "http://www.beke.co.nz/xforum/index.php"
    }

    <url>/

    Base URL: /xforum
    Base Path: /xforum
    Path Info: /
    Request URI: /xforum/

    array(6) {
    ["basePath"] => string(8) "/xforum/"
    ["host"] => string(14) "www.beke.co.nz"
    ["protocol"] => string(4) "http"
    ["fullBasePath"] => string(29) "http://www.beke.co.nz/xforum/"
    ["requestUri"] => string(8) "/xforum/"
    ["fullUri"] => string(29) "http://www.beke.co.nz/xforum/"
    }
     
  19. boban

    boban Well-Known Member

    I have solved my problem. It has nothing to do with Xenforo, the Apache virtual server was misconfigured. :oops: I'm sorry if I wasted your time.

    The following directives are added to the Apache virtual host configuration file:
    Code:
    <Directory "/my/directory">
    Options Indexes FollowSymLinks
    AllowOverride all
    Order allow,deny
    Allow from all
    </Directory>
    
     
  20. Forsaken

    Forsaken Well-Known Member

    I'm also running Litespeed, but I'm not having this issue at all...

    I'll ask my host if I can get a copy of his config if you want it.
     

Share This Page