I developed a PHP/MySQL app for collecting (front-end) and administering (back-end) form submissions using a simple framework. It's a self-contained app separate from the rest of the site, i.e., it's not under MODX control. Currently I link to the app front-end from MODX resources and it works fine. But now that the site is under MODX (and the app is not) the minor hiccup is with the admin side of the app which is password-protected via cPanel (Apache server), so when I try to login to the admin area so instead of getting the server login form I'm redirected to the site homepage (a 404).
Is there a simple way around this or do I have to bring the entire app into MODX? And if I do import it will it Just Work or will I have to modify it to work within MODX by creating Snippets etc.?
I suppose the other option would be to look for a MODX Add-on that performs this same function which might be the path of least resistance.
Thanks
Todd
If the App has PHP code mixed with HTML (as most do), all the PHP code would have to be moved into a snippet or snippets. How much work that is depends on how modular the code is. On the plus side, you should be much more secure without having the .php files on your site.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
MODX routes everything through its index.php file, and it doesn't recognize the URL so it sends you to whatever is set as the error_page.
I'm not really an expert on request handling, but you might be able to create a resource in MODX with an alias that gives the same URL as your page, then put a snippet on page that forwards users to the full URL.
You might also be able to create a rewrite rule in .htaccess that forwards to the page before MODX gets the URL.
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html
-
☆ A M B ☆
- 24,524 Posts
You can set a rewrite condition to ignore a request for your file in the .htaccess file.
It seems I spoke too soon. Using the previous suggestion I'm able to login and access the admin area of the non-MODX app but it now throws a 500 error when accessing the MODX controlled parts of the site. Oh well. This will require more time to figure out which I don't have at the moment but it's a start.
Thanks to all.
Revo 2.2.4
Todd
-
MODX Staff
- 10,725 Posts
This may be because of the connectors/ directory as well, since the manager uses the connectors for all the AJAX requests.