.htaccess files are no longer visible via FTP.

Home Forums BulletProof Security Free .htaccess files are no longer visible via FTP.

  • This topic has 8 replies, 2 voices, and was last updated 5 years ago by bill.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #37050
    bill
    Participant

    Hello, AITpro.

    I’ve noticed sometime between my more recent Pro updates, that my websites no longer show the .htacess file when viewing site files via FTP. But, I am able to view the .htacess file contents when I open .htaccess file editor via the Pro dashboard/UI. Are these files hidden now or do I have a deeper issue on my hands?

    Please advise and thanks.

    Bill

    #37051
    AITpro Admin
    Keymaster

    .htaccess files are distributed server configuration files and are hidden by default in most if not all FTP applications.  All FTP applications and control panel FTP tools have an option to “show hidden files”.  Look for an option in your FTP application or control panel FTP tool that says something like “show hidden files”.

    #37053
    bill
    Participant

    Thank you. The “show hidden files” box was unchecked. Never recalled checking or unchecking it in the past, but all is well now. Last question: I was searching for the file(s) because I wanted to do a temp redirect for an entire website and I remember the easiest way being via .htaccess. My question is: would you agree with that and would applying this line achieve it:

    # This allows you to redirect your entire website to any other domain
    Redirect 302 / http://example.com/
    #37054
    AITpro Admin
    Keymaster

    You should use the RedirectMatch htaccess directive since it allows you to use RegEx htaccess code:  RedirectMatch 301 ^/(.*)$ https://www.example.com/. Important Note: This htaccess code would need to go in an htaccess file under the folder where the other website is located because the htaccess file will be processed from that website when someone requests the URL for that website and will redirect to another website.

    #37055
    bill
    Participant

    Ok, thank you. Just for clarity: would the same rules apply if I only wanted to forward to a landing page? Example: I would like to have an entire site temporarily forward to one “coming soon” page.

    #37056
    AITpro Admin
    Keymaster

    Sounds like you want to put your website into Maintenance Mode.  BPS has a Maintenance Mode feature.  Or you can install one of the many WordPress Maintenance Mode plugins.  The problem you would run into if you wanted to redirect all website pages for a website is that you would no longer be able to login to your WordPress wp-admin area if you use the htaccess code in the previous forum reply.  I assume you are not trying to redirect a different website to another website and are instead trying to redirect all website pages on one website.

    #37057
    bill
    Participant

    “The problem you would run into if you wanted to redirect all website pages for a website is that you would no longer be able to login to your WordPress wp-admin area if you use the htaccess code in the previous forum reply.”

    That was my concern also.

    Full disclosure: I would like to forward any client’s website to a landing page (with my company’s logo) when they are severely behind on their monthly hosting and are not communicating with me in any way. I have a couple clients that really take advantage of me in this regard, and I figured I should send a message. But, I didn’t want to manually go in and redirect every page to the landing page or have to undo them if/when they did pay.

    #37058
    AITpro Admin
    Keymaster

    Ok then since these are different websites and not your website then you can use the htaccess code in the previous forum reply.  You would have to upload/add the htaccess code/file in the installation folder where the client has their website installed.  Example:  A request is made to URL:  example.com.  Since the request is sent to website domain URL:  example.com then the htaccess file that does the redirect to a landing page would need to exist in the installation folder where the client has their website installed.  It is not possible to create htaccess code from a different website domain since the request is not being made to that different website domain.

    #37059
    bill
    Participant

    Ok, great.

    Thank you for the instructions and for taking the time… I sincerely appreciate it.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.