XF 1.2 Change index.php to another URL

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!
 
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.
 
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.

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.
 
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.
 
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.

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.
 
I think we'll move our forums to ./forum/ folder or another different approach.
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.)
 
Top Bottom