|Last Updated||Ratings||Unique User Downloads||Download Rankings|
|2015-01-12 (8 months ago)||69%||Total: 1,902||All time: 1,962 This week: 1,205|
|changewebsitemode 1.0||GNU General Publi...||4.0||Utilities and Tools, Testing|
This class can be used to switch the access to sites between test and production versions.
Made by: Nadir Latif (firstname.lastname@example.org) 1) Overview: -Allows web masters to work with multiple websites (any number) in test mode. Each web site must have copy on the live server and on a test server. The script allows user to switch between the two copies of the website without having to change the url. -Provides a GUI interface for switching websites from test mode to live mode. The copy of the websites to be tested may be on localhost or on another machine. The script basically edits two files. The host file on localhost (from where the website is viewed) and the htaccess file on an apache server that hosts the copies of multiple websites to be tested. 2) Requirements -Requires php 4. -Apache web server on the computer which contains the copies of the websites. -All web sites must be copied to the root folder of the apache web server. -Each web site must be in a folder called public_html, which in turn must be in a folder of the same name as the web site. e.g mysite.com/public_html/index.php. -Place a .htaccess file in apache's root folder. -The web page produced by the script uses vbscript so the script must be viewed using internet explorer with activeX support for untrusted scripts enabled. 3) How it works: -To bring a site to test mode, the script adds a line in host file using vbscript which causes the site webpage to be fetched from the test server instead of the actual webserver. An entry is also made in the local apache htaccess file which causes the page to be fetched from the web sites folder. If the website is in test mode the url will fetch the page from the test server, while if it is in live mode the page will be fetched from the actual server. All this will be invisible to the user. -Only one website can be in test mode at a time. 4) Usage: -Replace the string "E:\www\\" with the location of the web root of the test server. -Replace the string "E:\www\.htaccess" with the location of a htaccess file on the web server that will host the multiple test websites. -Replace the string "C:\WINDOWS\system32\drivers\etc\hosts" with the location of the host file on locahost. -Place this script on the directory of a web server and access it using internet explorer with activeX support for untrusted scripts enabled. -Feel free to contact me for any assistance regarding this script.
|Version Control||Unique User Downloads||Download Rankings|
|This week:||0||This week:||1,205|