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

XF 1.4 Subdomain Admin.php?

Discussion in 'XenForo Questions and Support' started by Ablac, Sep 5, 2014.

  1. Ablac

    Ablac Active Member

    My forum is located at (mydomain).com/forum, and I'm using a Subdomain and a HTAccess redirect to redirect to forum.(mydomain).com. Within Xenforo Basic board Information I have the Board URL set to forum.(mydomain).com, accessing the sub domain links me to the forum, but typing forum.(mydomain).com/admin.php gives me a 404 error, is there something I'm missing that's stopping it from finding the admin.php? Or do i have to do a HTAccess If Else...

    It is able to access the forum directory fine, as I created a file within forum, called test.html, and accessing forum.(mydomain).com/test.html loads the test.html file.
     
  2. Mike

    Mike XenForo Developer Staff Member

    Are you sure that admin.php actually exists?

    Alternatively, there could be something that is running specifically against admin.php (based on a location match for example) that is interfering. (Your non-subdomain version has .htaccess protection on admin.php.)
     
  3. Ablac

    Ablac Active Member

    RewriteCond %{REQUEST_FILENAME}

    Its strange cause if i edit my HTAccess, and change
    Code:
      RewriteCond %{REQUEST_FILENAME} -f [OR]
       RewriteCond %{REQUEST_FILENAME} -l [OR]
       RewriteCond %{REQUEST_FILENAME} -d
    
    to
    Code:
      RewriteCond %{REQUEST_FILENAME} !-f [OR]
       RewriteCond %{REQUEST_FILENAME} !-l [OR]
       RewriteCond %{REQUEST_FILENAME} !-d
    
    Then the /admin.php starts working, but I lose everything else.

    I do have .htaccess protections but its based on the file.

    Code:
    AuthUserFile /My Non Public File Directoy/.htpasswd
    AuthName "Admins Only"
    AuthType Basic
    <Files "admin.php">
    require valid-user
    </files>
    
    Edit: another things that doesnt work is my Xenforo API URL, but again when I put the ! in front of the RewriteCond's the API starts working also, but I lose everything else...

    To me this entire thing makes no sense... cause none of the files changed, none of the file locations changed... so it should work perfectly fine wither its forums.mydomain.com or mydomain.com/forum
     
    Last edited: Sep 5, 2014
  4. Ablac

    Ablac Active Member

    .... I removed the Subdomain, and set the forum back to /forum in the Admin.php... and completely reverted everything i changed to make it forum.mydomain.com and the entire forum is now a Massive 500 error... forum.mydomain.com still links to the forum, but its also a 500 error just like mydomain.com/forum... I dont understand :'(

    Edit: Got rid of msot of the 500 errors and its been replaced with 404 errors everywhere... /forum/account /forum/login ECT. But strangely, if i go to forum.Mydomain.com/account it works... but if i go to forum.mydomain.com/admin.php i get a 500 error... and mydomain.com/forum/admin.php it works... Not sure what happening...

    Gana rebuild the master data.

    Edit: Rebuild didnt help at all :(
     
    Last edited: Sep 5, 2014
  5. AndyB

    AndyB Well-Known Member

    Did you enable Full Friendly URLs ? Try disabling Full Friendly URLs.
     
  6. Ablac

    Ablac Active Member

    I solved it, I am unable to use a Subdomain for the Xenforo installation though. I delete the API, the Install Directory, and the main .htaccess and rebuild master data, and put them back from a xenforo_1.4 complete download and the API plugin, Xenforo rebuilt its self and its working 100% again -_- kinda strange through that the DNS caused all that -_-
     

Share This Page