How to redirect or force websites from HTTP to HTTPS via .htaccessHow to redirect or force websites from HTTP to HTTPS via .htaccess. This guide is your blueprint to redirecting your website from the normal HTTP header to the more secured HTTPS. It must be noted that for HTTPS to work on your website, you must purchase and install an SSL certificate on your server. SSL requires paid subscription to leading security

certificate providers such as Comodo and Symantec. One good free alternative is to acquire a free SSL certificate from Lets Encrypt. However, this entails that you have at least SSH access or that your hosting provider allows installation of SSL via the CPanel. Finally, this guide requires intermediate know-how on the intricacies of the .htaccess files.How to redirect or force websites from HTTP to HTTPS via .htaccess

 

How to redirect or force websites from HTTP to HTTPS via .htaccess

➤ How to redirect or force websites from HTTP to HTTPS via .htaccess and phpMyAdmin
    To begin, use Notepad or your favorite Text Editor (Notepad++, Vim or Brackets), then paste the code below into your .htaccess file. Remember to create a backup before proceeding.
Try the following:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Also, you can redirect based on port number, for example:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
Note: You can opt to replace https://%{SERVER_NAME}%{REQUEST_URI} with your sample domain name e.g. https://www.sample.com/$1, as long as you include this line RewriteCond %{HTTP_HOST} ^sample\.com [NC] below the code RewriteEngine On. Also, you can retain ^.* in the rewrite code or use ^(.*) instead. Using these instead of the rewrite code above, will give us this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^sample\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.sample.com/$1 [R,L]
For SEO purposes, you may use [R=301, L] instead of [R,L]. The latter code, [R,L], tells search engines that the authority of the content must remain on the originating domain (http://sample.com for example). This is known as a temporary or a 302 redirect. If you wish to move the SEO content authority to the new domain which for this purpose is https://www.sample.com, then use [R=301,L]. This is better known as a permanent or a 301 Redirect. To implement a 301, look at the code below:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^sample\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^.*$ https://www.sample.com/$1 [R=301,L]
You may also apply the rewrite code only to a specific folder:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} subfolder
RewriteRule ^(.*)$ https://www.sample.com/subfolder/$1 [R,L]
Change ‘subfolder’ to your custom folder or directory name.
Let me know if this .htaccess stuff works for you. Remember to create a backup. Please post your comments or suggestions below.
posted May 9, 2018 by THE11thROCK for TeraBlitz.com
FAIR USE DISCLAIMER: The following data is for educational, scholarship review and archiving purposes only. By viewing this information, you release the website and its authors from any responsibility or liabilities. Though we verify and maintain the accuracy of the provided data, the absence of unintented typographical and factual errors cannot be guaranteed. Use the page at your own risk. For any suggestions, updates, credits or correction requests, Contact Us: terablitz.rock@gmail.com

HTTP Response Status Codes Table Cheat Sheet

http-response-codesThis is the HTTP Response Status Codes Table Cheat Sheet. Included in this post are the known Hypertext Transfer Protocol (HTTP) response status codes. It also include the status codes from the IETF internet standards as well as other RFCs, specifications and other commonly used codes. (more…)
ftp-server-codesThis is the FTP Server Return and Error Codes Table Cheat Sheet. The FTP server return codes always contain three digits, and each number has a special definition. The first digit will tell you if a server response is good, bad or incomplete.
Knowing fully well the meaning of the FTP Server Return Codes will help you know if an FTP connection, upload and download is going smoothly or not. It will also certainly give you a notification if something needs to be fixed or changed from the end of the server or the FTP client.ftp-server-codes
 
FTP Server Return Codes
Codes
Meaning
100 Series
Requested action is being initiated, expect another reply before starting a new command.
110
Restart marker replay . Text is exact and not left to implementation.
120
Service ready in nnn minutes.
125
Data connection already open; transfer starting.
150
File status okay; about to open data connection.
200 Series
The requested action has been successfully completed.
202
Command not implemented, superfluous at this site.
211
System status, or system help reply.
212
Directory status.
213
File status.
214
Help message. On how to use the server or the meaning of a command
215
NAME system type. Where NAME is an official system name from the IANA.
220
Service ready for new user.
221
Service closing control connection.
225
Data connection open; no transfer in progress.
226
Closing data connection. Requested file action successful (transfer or abort).
227
Entering Passive Mode (h1,h2,h3,h4,p1,p2).
228
Entering Long Passive Mode (long address, port).
229
Entering Extended Passive Mode (|||port|).
230
User logged in, proceed. Logged out if appropriate.
231
User logged out; service terminated.
232
Logout command noted, will complete when transfer done.
234
Specifies that the server accepts the authentication mechanism specified by the client, and the exchange of security data is complete. A higher level nonstandard code created by.
250
Requested file action okay, completed.
257
“PATHNAME” created.
300 Series
The command has been accepted, but the requested action is on hold, pending receipt of further information.
331
User name okay, need password.
332
Need account for login.
350
Requested file action pending further information
400 Series
The command was not accepted and the requested action did not take place, but the error condition is temporary and the action may be requested again.
421
Service not available, closing control connection. This may be a reply to any command if the service knows it must shut down.
425
Can’t open data connection.
426
Connection closed; transfer aborted.
430
Invalid username or password
434
Requested host unavailable.
450
Requested file action not taken.
451
Requested action aborted. Local error in processing.
452
Requested action not taken. Insufficient storage space in system.File unavailable (e.g., file busy).
500 Series
Syntax error, command unrecognized and the requested action did not take place. This may include errors such as command line too long.
501
Syntax error in parameters or arguments.
502
Command not implemented.
503
Bad sequence of commands.
504
Command not implemented for that parameter.
530
Not logged in.
532
Need account for storing files.
534
Could Not Connect to Server – Policy Requires SSL
550
Requested action not taken. File unavailable (e.g., file not found, no access).
551
Requested action aborted. Page type unknown.
552
Requested file action aborted. Exceeded storage allocation (for current directory or dataset).
553
Requested action not taken. File name not allowed.
600 Series
Replies regarding confidentiality and integrity
631
Integrity protected reply.
632
Confidentiality and integrity protected reply.
633
Confidentiality protected reply.
10000 Series
Common Winsock Error Codes
10054
Connection reset by peer. The connection was forcibly closed by the remote host.
10060
Cannot connect to remote server.
10061
Cannot connect to remote server. The connection is actively refused by the server.
10066
Directory not empty.
10068
Too many users, server is full.
posted February 25, 2016 by THE11thROCK for TeraBlitz.com
FAIR USE DISCLAIMER: The following data is for educational, scholarship review and archiving purposes only. By viewing this information, you release the website and its authors from any responsibility or liabilities. Though we verify and maintain the accuracy of the provided data, the absence of unintented typographical and factual errors cannot be guaranteed. Use the page at your own risk. For any suggestions, updates, credits or correction requests, Contact Us: terablitz.rock@gmail.com
ftp-server-codesThis is the FTP Client Commands Table Cheat Sheet. The table below lists the FTP commands that may be sent to an FTP server, these includes all commands that are standardized by the IETF.
It is important to know that most command-line FTP clients have their own set of commands for their users. As an example, GET is the user command to download a file instead of the known and raw command RETR.ftp-server-codes
 
FTP Commands for Clients and Servers
Command
Description
ABOR
Abort an active file transfer.
ACCT
Account information.
ADAT
Authentication/Security Data
ALLO
Allocate sufficient disk space to receive a file.
APPE
Append.
AUTH
Authentication/Security Mechanism
CCC
Clear Command Channel
CDUP
Change to Parent Directory.
CONF
Confidentiality Protection Command
CWD
Change working directory.
DELE
Delete file.
ENC
Privacy Protected Channel
EPRT
Specifies an extended address and port to which the server should connect.
EPSV
Enter extended passive mode.
FEAT
Get the feature list implemented by the server.
HELP
Returns usage documentation on a command if specified, else a general help document is returned.
HOST
Identify desired virtual host on server, by name.
LANG
Language Negotiation
LIST
Returns information of a file or directory if specified, else information of the current working directory is returned.
LPRT
Specifies a long address and port to which the server should connect.
LPSV
Enter long passive mode.
MDTM
Return the last-modified time of a specified file.
MIC
Integrity Protected Command
MKD
Make directory.
MLSD
Lists the contents of a directory if a directory is named.
MLST
Provides data about exactly the object named on its command line, and no others.
MODE
Sets the transfer mode (Stream, Block, or Compressed).
NLST
Returns a list of file names in a specified directory.
NOOP
No operation (dummy packet; used mostly on keepalives).
OPTS
Select options for a feature.
PASS
Authentication password.
PASV
Enter passive mode.
PBSZ
Protection Buffer Size
PORT
Specifies an address and port to which the server should connect.
PROT
Data Channel Protection Level.
PWD
Print working directory. Returns the current directory of the host.
QUIT
Disconnect.
REIN
Re-initializes the connection.
REST
Restart transfer from the specified point.
RETR
Retrieve a copy of the file
RMD
Remove a directory.
RNFR
Rename from.
RNTO
Rename to.
SITE
Sends site specific commands to remote server.
SIZE
Return the size of a file.
SMNT
Mount file structure.
STAT
Returns the current status.
STOR
Accept the data and to store the data as a file at the server site
STOU
Store file uniquely.
STRU
Set file transfer structure.
SYST
Return system type.
TYPE
Sets the transfer mode .
USER
Authentication username.
XCUP
Change to the parent of the current working directory
XMKD
Make a directory
XPWD
Print the current working directory
XRCP
 
XRMD
Remove the directory
XRSQ
 
XSEM
Send, mail if cannot
XSEN
Send to terminal
posted February 25, 2016 by THE11thROCK for TeraBlitz.com
FAIR USE DISCLAIMER: The following data is for educational, scholarship review and archiving purposes only. By viewing this information, you release the website and its authors from any responsibility or liabilities. Though we verify and maintain the accuracy of the provided data, the absence of unintented typographical and factual errors cannot be guaranteed. Use the page at your own risk. For any suggestions, updates, credits or correction requests, Contact Us: terablitz.rock@gmail.com