Posts

Showing posts from November, 2013

Htaccess File Tutorial and Tips

Image
Htaccess File Tutorial and Tips. [THIS DOCUMENT COPIED FROM  http://www.9lessons.info/2013/11/htaccess-file-tutorial-and-tips.html  ] Using  .htaccess  file  we can easily configure and redirect Apache Web Server file system. This post will explain you how to create friendly URLs, sub domain directory re-directions and many more. Note:   .htaccess  file will be in hidden format, please change your folder and file settings to view this file.  How to Create a .htaccess File? Open any text editor application and file save as with  .htaccess  name and enable mod_rewrite  extension in  php.ini  file in Apache Web Server configurations.  Default directory Listing Disable directory Listing If you want to disable folder files listing, include following code.  # Disable Directory Browsing Options  All  -Indexes Error Pages Here error page is redirecting to  error.html .  errorDocument  400  http://www.youwebsite.com/error.html errorDocument  401  http://www.youwebsi

Create localhost webserver simple http server

Using PYTHON $ python -m SimpleHTTPServer 8000 This will start a webserver listening on port 8000 and serving files from the current directory. Using PYTHON 3 python -m http.server Using PHP $ php -S localhost:8000 Using Ruby with Rack $ rackup -b "run Rack::Directory.new('.')"

Determine which service using port 80 in Windows

1) How to determine what software is using port 80 in WINDOWS netstat -aon | findstr 0.0:80 It will list all services which is using port 80 with PID (Process ID), The last one PID TCP    0.0.0.0:445             0.0.0.0:0              LISTENING       4 TCP    0.0.0.0:49152          0.0.0.0:0              LISTENING       524 TCP    0.0.0.0:49153          0.0.0.0:0              LISTENING       1012 2)  Port 80 is being used by SYSTEM (PID 4), How to stop IIS Services Open command prompt and type these command Taskkill /PID 4 /F If this will result like this  ERROR: The process with PID 4 could not be terminated. Reason: Access is denied. Then Type this command iisreset /stop now run this command   netstat -aon | findstr 0.0:80