XF 1.3 Missing Style in Admin CP

Gossamer

Active member
So, I recently moved my forum to a new host. Part of the move involved moving from a parked domain to a subdirectory of the main domain on a new host. I have my htaccess removing the subdirectory from the url (so it looks like sitename.com instead of sitename.com/subdirectory). Everything is working great accept for the admin CP.

When I go in there, it loads like this:
66e00bcef61e650acb25c31845f3d74b.png

However, if I navigate to it with the subdirectory included in the url, it loads just fine. It just seems to fail without the subdirectory in the url.

In short:
  • website.com/admin.php (missing admin cp styles -- I'd like to fix this)
  • website.com/subdirectory/admin.php (working perfectly)
Any tips on how I can fix this so that it can load without the subdirectory being included in the url?
 
Last edited:
This appears to be something related to your server configuration. It's ignoring (or removing?) parts of the query string, particularly the ones without a named value. The following 2 pages should load the same thing:

<url>/index.php?help/
<url>/help/

Only the latter works. However <url>/index.php?_=help/ does work, which indicates it's an issue with non-named parameters. Your host may be able to provide some guidance. If you submit a ticket with ACP access details, we might be able to give more guidance (though it's very likely to be a server issue).
 
Thanks! I'll try checking with my host. Though could this have something to do with my url rewrite rule in .htaccess?

Code:
RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.pandorarp\.com [NC]
RewriteRule ^(.*) http://pandorarp.com/$1 [L,R=301]

RewriteRule ^$ insidethebox/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ insidethebox/$1

It's a bit tricky for me to test right now, since the dns is still propagating, so I keep getting switched back and forth between the old and new server. :)
 
I would say that it's pretty likely to be related to your custom rewrite there but I'm not positive. I have seen people run into problems with URLs when trying to do something similar to what you're doing. It's much preferable to setup the document root for your domain such that the files exist naturally at the URL you're accessing.
 
You can edit your Windows hosts file to prevent that.
This is cool, thanks!

I would say that it's pretty likely to be related to your custom rewrite there but I'm not positive. I have seen people run into problems with URLs when trying to do something similar to what you're doing. It's much preferable to setup the document root for your domain such that the files exist naturally at the URL you're accessing.
Yeah, if I can't figure out a fix for this, that's probably what I'll end up doing. I planned on using my hosting for multiple sites, so I'd prefer a neater directory structure (folders for each site, instead of folders for other sites mixed in with the XF structure). But you do what you gotta do.

Thanks!
 
Back
Top Bottom