Kompx.com or Compmiscellanea.com

Renaming folders in mc

Operating systems : Linux

Renaming a folder in mc / Midnight Commander:

- Select a folder --> Shift - F6 --> Edit existing folder name into a new one --> Enter

Select a folder

Image : mc - Select a folder

Edit folder name

Image : mc - Edit folder name

The original way of renaming a folder - the one mc / Midnight Commander had before "Shift - F6" was implemented - is also still there:

- Select a folder --> F6 --> Enter a new folder name --> Enter

Select a folder

Image : mc - Select a folder

Enter folder name

Image : mc - Enter folder name

And "Esc - 6" may be used instead of "F6":

- Select a file --> Esc - 6 --> Enter a new folder name --> Enter

Select a folder

Image : mc - Select a folder

Enter folder name

Image : mc - Enter folder name

Aliosque subditos et thema

 

HTTP to HTTPS redirect in .htaccess

 

Redirecting from HTTP to HTTPS, when the web server serving the pages is behind a load balancer or reverse proxy. Server configuration: Apache + nginx; SSL is enabled; SSL-certificate is purchased, approved and installed. That is, everything is up and running. So it is just the HTTP to HTTPS redirection that is left to get ready and start up. Directives for .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{HTTP:X_FORWARDED_PROTO} !https [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] HTTP to HTTPS redirect -- Enable runtime rewriting engine: RewriteEngine On -- If domain name has no www: RewriteCond %{HTTP_HOST} !^www\. [NC] -- Then replace it with domain with www: RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] -- If HTTPS is not present: RewriteCond %{HTTP:X_FORWARDED_PROTO} !https [NC] -- Then replace domain without HTTPS with domain with HTTPS: RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] Notes 1. X_FORWARDED_PROTO may instead be called X-Forwarded-Proto or even else. The point is to obtain the information from a load balancer or reverse proxy on the original request it gets. Load balancers or reverse proxies may provide the web server with this info and a header named X_FORWARDED_PROTO or X-Forwarded-Proto or else may be sent, holding the protocol string. It is most often so, but not always. So it should probably be determined by practice how to get the protocol string in a particular case. 2. The other way is just to set the environment variable (if it is suitable for the given web server): SetEnvIf X_FORWARDED_PROTO https HTTPS=on Then directives for .htaccess file are to be like this: RewriteEngine On SetEnvIf X_FORWARDED_PROTO https HTTPS=on RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond %{HTTP:HTTPS} !on [NV] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L] 3. Apache Module mod_rewrite docs: http://httpd.apache.org/docs/current/mod/mod_rewrite.html

ELinks. Use

 

Jump to: ELinks - Text-based or console web browser. Description: features, screenshots, download links. ELinks. Configuration - How to configure ELinks. Once started, ELinks allows a user to do almost all it is capable of by means of its menu. So it is only how to start ELinks and how to do several other things as an example that is explained here. 1 ) Starting ELinks - ELinks may be run under a GUI environment (X Windows, MS Windows, etc) or some command-line interface. In the first case a terminal emulator / console must be opened before ELinks is to be started: xterm, rxvt, Win32 console and others: ELinks ( Linux ) - To start ELinks, enter command: elinks - To start ELinks opening a web document from Internet: elinks Web address of a web document - To start ELinks accessing hard disk to browse local folders: elinks file:/// or: elinks / - To start ELinks opening a local folder: elinks file:///home/user1/ or: elinks /home/user1/ - To start ELinks opening a local file: elinks file:///home/user1/document1.htm or: elinks /home/user1/document1.htm ELinks ( Windows ) - To start ELinks, enter command: elinks - To start ELinks opening a web document from Internet: elinks Web address of a web document - To start ELinks accessing hard disk to browse local folders: elinks file:/// - To start ELinks opening a local folder: elinks file://c/home/user1/ - To start ELinks opening a local file: elinks file://c/home/user1/document1.htm 2 ) To access the menu of ELinks: Press Esc on keyboard 3 ) Opening a web document in ELinks already running: Press g on keyboard or Esc --> File --> Go to URL --> [ Enter a web address ] --> Enter 4 ) Going back: Left arrow of Arrow keys on keyboard or Esc --> File --> Go back 5 ) Opening a link in a new tab in background: Shift - t or Esc --> Link --> Open in new tab in background 6 ) Going to the next tab: Shift - > or Esc --> View --> Next tab 7 ) Closing a tab: Press c on keyboard or Esc --> View --> Close tab 8 ) Passing a URI to an external application when running ELinks in a terminal emulator. There are many applications it is possible to pass a URI to, here it is about passing a URI to clipboard.