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

XF 1.2 Change index.php to another URL

Discussion in 'XenForo Questions and Support' started by Adam K M, Jul 10, 2013.

  1. Adam K M

    Adam K M Active Member

    Hello!

    My friends and I are currently trying to make our forum index go from "index.php" to "forums.php" in the same directory...
    i.e. Forum Category list can be found myurl.com/forums.php instead of myurl.com/index.php

    We want to make our own custom home page... though due to the nature of one of our add-ons, we can not afford to move the forums to another folder.

    Thanks!
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You can try modifying library/XenForo/Link.php. Search for and change "index.php" in that file. In the case of friendly URLs you also need to modify the .htaccess file. Untested, but those are the two instances of "index.php" that come to mind.
     
  3. Eagle

    Eagle Well-Known Member

    That's awesome and working good but now getting the error "The server responded with an error. The error message is in the JavaScript console." when click smilies icon on editor panel.
     
  4. Chris D

    Chris D XenForo Developer Staff Member

    Unfortunately index.php is hardcoded into some URLs in some locations (usually AJAX requests). I would advise against modifying references to that file.

    If you absolutely had to you'd have to search through all files (including .js files) and update references to index.php there too. You'd have to remember to reapply those changes after upgrades. There's no guarantee that some add-ons won't also rely on index.php being called index.php too. I know there's some Xen Media Gallery stuff that calls upon index.php.

    I'd strongly recommend a different approach.
     
  5. Eagle

    Eagle Well-Known Member

    That is correct and agreed. Now I've changed bb_code_edit.js file, search for "index.php" and rename to "forum.php" and problem solved. However, all js files should be change because it will big a problem when upgrade forum. What's your another suggest? How to use XF and WP in the same ftp root? Thanks.
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    I don't really have any experience when it comes to WordPress so I'm not sure. I don't think what you're trying to do is possible.
     
  7. Eagle

    Eagle Well-Known Member

    Well then, thank you Chris :) I think we'll move our forums to ./forum/ folder or another different approach. Thanks again.
     
  8. Mike

    Mike XenForo Developer Staff Member

    I was going to suggest that. The difference would be forum.php?threads/xyz.123/ vs forum/threads/xyz.123/ -- the latter seems better and sorts all the issues. (And I'd often recommend naming the directory "community" so you don't have forum/forums/123.)
     
    Eagle and Chris D like this.
  9. Eagle

    Eagle Well-Known Member

    I see, it's okay now, thank you Mike :coffee:
     

Share This Page