1

I have a client that wants to edit their .htaccess file within ExpressionEngine's CP as opposed to editing the file locally and FTP'ing it back to the server. Is it possible to customize EE to allow for such, that is, read in the contents of the .htaccess file and once updates are made, write the contents back to the file and save on the server's hard disk? I searched Devot:ee and didn't see any add-ons or plugins to do so. Thanks in advance...

2

You're going to want NSM .htaccess Generator, Marc. This will update the .htaccess as they add new entries, as well as edit the baseline of the .htaccess file, itself.

| improve this answer | |
  • No problem! Depending on which solution you went with, could you explain why and mark the “correct” answer? – Christopher Kennedy Feb 6 '13 at 22:37
  • Nooo. Don't use NSM htaccess generator. It breaks form submissions on some servers and is very difficult to diagnose. – Adrian Macneil Feb 25 '13 at 8:36
1

Detour Pro is recommended often around here as well, if they're just looking to manage redirects.

| improve this answer | |
  • I think it’s important to note that Detour Pro is awesome, but it can’t handle more complicated RegEx matching schemes for redirects. At least, that’s been my experience. – Christopher Kennedy Feb 6 '13 at 20:11
  • Agreed. It's an option depending on their needs. If the client wants to avoid using FTP, though, I wonder how complex their needs can be :) – Mark J. Reeves Feb 6 '13 at 20:12
  • You’re right. I think if Marc gives us a little more info here, either one of these fine addons will do the job for his client’s use case scenario. – Christopher Kennedy Feb 6 '13 at 20:15
  • Really, it's that simple. The client will be adding some custom syntax to the .htaccess file that's not dependent on EE at all. I told them you can edit the .htaccess file until you're blue in the face and simply re-upload it to the server. As opposed that approach, they now want to be able to make edits to the .htaccess file from within EE's control panel. Rather than try and write a new plugin/add-on for this, I wanted to know if I could use something out there already that would allow the client to simply edit the .htaccess contents and save from within EE. – Marc Johns Feb 6 '13 at 20:24
  • Then .htaccess Maker from Yuri, or NSM .htaccess Generator are going to be your best course of action, Marc. The obvious advantage of NSM’s addon (if I’m understanding Yuri’s correctly) is that it is editable in it’s own window, so you don’t have to grant template access to the client. – Christopher Kennedy Feb 6 '13 at 21:30
0

.htaccess Maker allows you to use any EE template (and so any template tags) to generate your .htaccess file each time any template is updated (or you can invoke generation manually from CP). And it's free :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.