Skip to main content

Direct access to phpMyAdmin

If you would like an easy way to have automatically go to a secure page for phpMyAdmin, just put these three lines at the top of your .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^phpmyadmin\.
RewriteRule ^(.*)$ https:// [L]
substitute yourserver with the name of your site5 server.
One more fine point.  If you are using multiSite, you will need to put that code in the primary domain name .htaccess file.  At site5, all undefined subdomains for any domain name are routed to the primary domain name.
Avoid hard coding the path
There are times when you want to code the full path in a script.  For example, this could be done for includes where you are using the same code in many locations on your site.  Many of the scripts on this page require a file path.  Don't hard code the value in your scripts, as you make the scripts less portable and you are giving away your username if someone is able to gain access to the code.  Instead use this method:

include("/home/" . get_current_user() . "/public_html/rest_of_path_to_file");

Concealing the main domain with multiSite
When using the multiSite Plan at site5 all your sites share one IP Address.  You can get to any of the sites by using IPAddress/~username (where username is the netAdmin master username for the site).  The problem is when you do this the IP Address in the address bar changes to the primary domain name.  You may not want to reveal the primary domain name, and this behaviour is not what one may expect.  You can change that by using this one .htaccess line in each of your domain sites.  Now when accessing the site by the IP Address the address bar will change to the correct domain name.

RedirectMatch ^/~[^/]*(/.*)?$$1

Replace with the domain name for your situation.

Then for the primary domain which can be accessed directly by using the IP Address, the site must be hidden.  The IP Address can be obtained from any of the other domain names, so the IP Address must be re-routed to keep the main site concealed.  To do that you can put this in your .htaccess file for the main site:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^999.999.999.999
RewriteCond %{REQUEST_URI} !^/blank.htm
RewriteRule ^(.*)$ http://999.999.999.999/blank.htm [L]

Replace IP Address with yours, and route the page anywhere you want.  This example uses blank.htm (note that the page name is in two places in the code).

Note - Do not use this until your DNS points to site5.  If your DNS points to another host and you are using the IP Address to view your sites, you will be re-reouted to the other host.


Popular posts from this blog

All this clearly indicated that Gundred’s interference

All this clearly indicated that Gundred’s interference was urgently needed in the cause of holiness. Day by day she watched the situation, feeling more and more certain that her mission was the rescue of her husband. He, meanwhile, bore hourly, with increasing pain, the tantalizing torments of his paradoxical proximity to the thing he had so long looked for and now had found in vain. Ivor Restormel wondered at his good fortune, and only occasionally noticed the crochets of Kingston and Gundred. Of the two, Gundred had by far the more tactful temperament. Her dislike, now fast verging towards religious horror, was not to be discerned except by an eye far more keen than Ivor Restormel’s. A serene gravity, a cool calm were so much the dominant characteristics of her nature that the exaggeration of her gravity, the additional chill in her calm passed unnoticed by one so little practised in observation. The restless eagerness of Kingston was more plain and more distressing. Ivor Restormel

Dove, fra l'altro, si spiega quale valore desse, il Nostro Cavaliere, alla parola «versipelle»; e di nuove venture che gli toccarono.

Ora il Cavalier Mostardo dormiva nel suo gran letto di quercia massiccia, fra un ritratto di Mazzini ed uno di Garibaldi. Aveva, appeso al muro, sopra il tavolo da notte, dove la gente religiosa tiene l'acquasantiera, una vecchia carabina; la  Santa Carabina ; e, sul tavolo da notte, invece della bottiglia e del bicchiere per l'acqua, era posato un ampio boccale verde con sopravi la dicitura consueta: « Evviva la Repubblica! ». E la Repubblica abitava con lui in quel suo stanzone severo, inelegante, dal mobilio spaiato, dalle pareti squallide; la Repubblica occhieggiava attraverso una grande bandiera rossa, appoggiata in un angolo; sorrideva da un berretto frigio; strepitava in una serie di disegni allegorici incollati al muro; minacciava in una collezione rilegata del vecchio giornale « Aristogitone »; si umanizzava in una statuetta simbolica in coccio, sopra il canterale; si divinizzava nei trionfi dell'ottantanove, matroneggiando in disegni e oleografie sparsi qua e là

The Flame Breathers

I write this narrative, not with the idea of contributing any additional scientific data to the discovery of Vulcan, but to put upon the record the real facts of our truly-amazing space voyage. The newscasters have hailed me as a modern Columbus. Surely I would not want to appear ungracious, unappreciative of all the applause that has been heaped upon me. But I do not deserve it. I did my job for my employers. The Society sent me to make a landing upon Vulcan—if the little planet existed. I found that it does exist; it was exactly where I was told it ought to be. I carried out my instructions, returned and made my report. There is no great heroism in that. So I am writing the facts of what happened. Just a bald, factual account, without the imaginative trimmings. The real hero of the discovery of Vulcan was young Jan Holden. He did his job—did it well—and he did something just a little extra. I'm Bob Grant, which of course you have guessed by now. Peter Torrence—the third m