Home › Forums › BulletProof Security Free › .htaccess files are no longer visible via FTP.
- This topic has 8 replies, 2 voices, and was last updated 4 years, 8 months ago by
bill.
-
AuthorPosts
-
bill
ParticipantHello, 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
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”.
bill
ParticipantThank 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/
AITpro Admin
KeymasterYou 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.bill
ParticipantOk, 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.
AITpro Admin
KeymasterSounds 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.
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.
AITpro Admin
KeymasterOk 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.
bill
ParticipantOk, great.
Thank you for the instructions and for taking the time… I sincerely appreciate it.
-
AuthorPosts
- You must be logged in to reply to this topic.