Updating an existing website. how? - web

If I have a website that runs in online, how do i update my website? I do not want any client to see the progress. Only the output. Using c panel to edit my website.

Make a note on your website saying website is down for upgrading/maintenance. Take it off internet. Work on your code duly, update and host it back.

Configure the. htaccess to display maintenance mode then change to normal mode after making the changes

Related

Opening a read only URL with password

New to Web site dev, though have done a lot of coding of other sorts in the past, just set up a personal blog for my own amusement on bluehost using wordpress and have it installed locally for dev.
I have a training log on another site which anyone can open read-only to view training stats with a URL of the form below, this works fine in a browser:
https://www.othersite.com/logs/1234xyz/authenticate?password=thisismypassword
What I have tried to do unsuccessfully is have this open in a frame on one of my web pages (used iframe/object in html). It seems impossible to do this as the authentication string is not passed across, and the screen displayed prompts for manual input of the password. Can I open this automatically in some way?
If I understood well, your solution is insecure regardless it works or not. In this way your clients can see the password of your (or another) site.
I suggest to query the external content using custom php code and display (print) it on your page.
There are several ways to get content of an external page:
https://www.php.net/manual/en/function.stream-context-create.php
https://www.php.net/manual/en/function.curl-init.php
If you need a tutorial for WP plugins check this out:
https://www.wpbeginner.com/wp-tutorials/how-to-create-a-wordpress-plugin/

permanently keep a edited website, locally

I would like to keep a copy of a website, which I have edited saved locally to my machine, but so when I type in the url it comes up as the webpage I edited. It is not my website, I don't have access to the server but I would like my own edited copy of the website. Something like greasemoneky but which is easier to setup and use but also able to be able to sync with chrome if possible.
Thanks in Advance
Add an entry in C:\Windows\System32\drivers\etc\hosts file so that the URL redirects to your own computer?
127.0.0.1 www.google.com
Then you have to have a webserver installed with the local page bound to the url.
I'm not sure what you're intending to use this for. Hopefully not anything shady.
To redirect any website url on your local machine you could set up parental controls.
There's plenty of ways to do it and it depends on your browser/operating system/modem.
You can locally redirect files via your computer's local hostfile.
http://en.wikipedia.org/wiki/Hosts_file
https://www.youtube.com/watch?v=_pTvYMCMtKU
If you really want to get serious about it, then you could set up a little local DNS hijack with a service like OpenDNS. An even more extreme option would be something like DNSMASQ http://www.thekelleys.org.uk/dnsmasq/doc.html.
After you finish editing the website,press ctrl+s and that will save a copy of the website.

launch google search from link

I am running a website based on php on a server run by a large host. My goal is very simple. Include link on my site to google search where I dynamically give the search term.
Starting with the url that appears in the address bar, I've narrowed the syntax down to
http://www.google.com/search?q=test
This works when I type it into the address bar. However, when I launch from the server, it redirects to:
www.google.com/webhp...lots of characters
There are references on the web to webhp being related to a virus but I'm pretty sure my host does not have any viruses on its servers.
Does anyone know proper way to launch simple google search from a link? Is a straight link forbidden? I am Willing to use JS to push link to client if necessary (which I use for google maps at Google's recommendation due to usage limits) but want to keep things as simple as possible. This link is just to save people a few clicks.
Thanks for any suggestions.
Simply use the urlencode Method
<?php
echo '<a href="http://www.google.com/search?q=', urlencode($userinput), '">';
?>
If you wish to do it with Javascript the answer is here: Encode URL in JavaScript?
Try to track down the "Url Rewriting", I think its a virus you need to remove: http://www.ehow.com/how_8728291_rid-webhp.html
WebHP is a computer virus that automatically sets your homepage to a
fake Google site, known as Google.com/WebHP. This virus will also
randomly open windows or tabs to load this website, as well as
generate pop-ups and fake errors. Also installed with this virus is a
rootkit which can disable your PC's firewall and other methods of
security. If left untreated, the WebHP virus allows hackers to
remotely access your computer and steal personal information, such as
credit card numbers and email passwords.

Dreamhost - mirror site while in development

new to dreamhost here and have followed the wiki on this but still need some additional help if possible. I want to be able to preview a site while I work on it, before I point the live domain to my dreamhost server. I've added the domain via the Control Panel, and all my files sit in the directory, /home/user/mysite.com - which is correct I think. When trying to follow the wiki with regards the mirroring details, I find that the only option I have is as follows, where I can't change any of these details:
Create the mirror at: mysite.com
Mirror this site: existingsite.com
The existingsite.com is just a live site sitting on the same server space. Is there something I'm missing here? Probably a newb mistake no doubt :)
Mirroring is for you to point a domain to an existing site. Hence this means you can mirror on 1 site. ie. both existingsite.com and mirrorsite.com points to the same server space.
If you want to create a development site, you probably are talking about 2 installations.
In this case, a quick and dirty trick I use is to create a development subdomain, dev.existingsite.com and fully host it. You normally get a /home/user/dev.existingsite.com folder with this. When your site is fully ready, you can edit your fully hosted existingsite.com and point the web directory to dev.existingsite.com. A better way is to SSH in and move the files.
There's an option copy files over in the settings page. Anyway dreamhost live help is pretty good. This is definitely something they will answer.

How do you globally modify page output sent from IIS without modifying the page source?

A couple sites of mine recently got "hacked". Someone was able to add a line of JavaScript to the bottom of every page on the site.
The server is a Windows Server 2003, and has Cold Fusion 8 and MySQL 5.x installed and running.
Looking into the code on each page shows that none of the pages were modified. The JavaScript is not in the code files themselves. This leads me to believe it is an IIS problem, but I am unsure and cannot find anything that would be able to do this within IIS.
The JavaScript being added redirects a user to another page only when they come from Google, or at least it appears to work this way.
Any help on how someone was able to accomplish this as well as removing it would be greatly appreciated.
Another way to word the question thanks to #Jeffrey Hantin
How do you systematically modify output from IIS without modifying individual pages?
EDIT: A bit more testing has shown that only the .cfm pages add the extra javascript. Added a new .cfm and the js was there but a .html did not have it.
Edit2: Turns out to have been a coldfusion problem after all. Somehow the pages OnRequestEnd.cfm were created on the sites and added that js.
Looks like someone exploited some latest Adobe CF vulnerabilities.
Please see these blog posts for details and try to search symptoms on your server:
Image upload
FCKEditor bug + this post
Hope this helps.
Turns out to have been a coldfusion problem after all. The page OnRequestEnd.cfm were created on the sites and added that js.
If you only want to use IIS to modify output, the ISAPI filter is probably the best answer. If you would like to use Coldfusion, you could utilize the application.cfc to modify output during certain parts of the request cycle or wrap all of your pages in a Custom Tag to consolidate the like portions of your page templates.
I have used both. In cases where my page headers and footers are all the same, the custom tag is fast and easy to use. To make changes to all the pages, you edit one custom tag file. In cases where I have a more complicated web application I'll use the application.cfc to store and insert common components where they are needed.
They might have guessed your password. You should change it immediately.
It's possible that an ISAPI filter is used to do this. I once used one myself to perform compression before IIS supported it natively.
In your specific situation, you may want to check for ISAPI filters you don't want installed. Of course, if your server has been compromised, you will likely be better off rebuilding from a known good image rather than trying to fix it in situ.

Resources