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

3 Answers 3

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.

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

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

6
  • 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. Feb 6, 2013 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 :) Feb 6, 2013 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. Feb 6, 2013 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, 2013 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. Feb 6, 2013 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 :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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