Saturday, May 30, 2009

WINDOWS XP HIDDEN APPS

To run any of these apps go to Start > Run and type the executable name (ie charmap).

WINDOWS XP HIDDEN APPS:

1) Character Map = charmap.exe (very useful for finding unusual characters)

2) Disk Cleanup = cleanmgr.exe

3) Clipboard Viewer = clipbrd.exe (views contents of Windows clipboard)

4) Dr Watson = drwtsn32.exe (Troubleshooting tool)

5) DirectX diagnosis = dxdiag.exe (Diagnose & test DirectX, video & sound cards)

6) Private character editor = eudcedit.exe (allows creation or modification of characters)

7) IExpress Wizard = iexpress.exe (Create self-extracting / self-installing package)

8) Microsoft Synchronization Manager = mobsync.exe (appears to allow synchronization of files on the network for when working offline. Apparently undocumented).

9) Windows Media Player 5.1 = mplay32.exe (Retro version of Media Player, very basic).

10) ODBC Data Source Administrator = odbcad32.exe (something to do with databases)

11) Object Packager = packager.exe (to do with packaging objects for insertion in files, appears to have comprehensive help files).

12) System Monitor = perfmon.exe (very useful, highly configurable tool, tells you everything you ever wanted to know about any aspect of PC performance, for uber-geeks only )

13) Program Manager = progman.exe (Legacy Windows 3.x desktop shell).

14) Remote Access phone book = rasphone.exe (documentation is virtually non-existant).

15) Registry Editor = regedt32.exe [also regedit.exe] (for hacking the Windows Registry).

16) Network shared folder wizard = shrpubw.exe (creates shared folders on network).

17) File siganture verification tool = sigverif.exe

18) Volume Contro = sndvol32.exe (I've included this for those people that lose it from the System Notification area).

19) System Configuration Editor = sysedit.exe (modify System.ini & Win.ini just like in Win98! ).

20) Syskey = syskey.exe (Secures XP Account database - use with care, it's virtually undocumented but it appears to encrypt all passwords, I'm not sure of the full implications).

21) Microsoft Telnet Client = telnet.exe

22) Driver Verifier Manager = verifier.exe (seems to be a utility for monitoring the actions of drivers, might be useful for people having driver problems. Undocumented).

23) Windows for Workgroups Chat = winchat.exe (appears to be an old NT utility to allow chat sessions over a LAN, help files available).

24) System configuration = msconfig.exe (can use to control starup programs)

25) gpedit.msc used to manage group policies, and permissions

Set Google as your default search engine in IE.

Copy everything in the box below into NOTEPAD

CODE
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main]
"Search Page"="http://www.google.com"
"Search Bar"="http://www.google.com/ie"

[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchURL]
""="http://www.google.com/keyword/%s"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Search]
"SearchAssistant"="http://www.google.com/ie"


1. Save the file as Google.reg
2. Double click to import to your registry.

DirectX Explained

Ever wondered just what that enigmatic name means?

Gaming and multimedia applications are some of the most satisfying programs you can get for your PC, but getting them to run properly isn’t always as easy as it could be. First, the PC architecture was never designed as a gaming platform. Second, the wide-ranging nature of the PC means that one person’s machine can be different from another. While games consoles all contain the same hardware, PCs don’t: the massive range of difference can make gaming a headache.


To alleviate as much of the pain as possible, Microsoft needed to introduce a common standard which all games and multimedia applications could follow – a common interface between the OS and whatever hardware is installed in the PC, if you like. This common interface is DirectX, something which can be the source of much confusion.

DirectX is an interface designed to make certain programming tasks much easier, for both the game developer and the rest of us who just want to sit down and play the latest blockbuster. Before we can explain what DirectX is and how it works though, we need a little history lesson.

DirectX history

Any game needs to perform certain tasks again and again. It needs to watch for your input from mouse, joystick or keyboard, and it needs to be able to display screen images and play sounds or music. That’s pretty much any game at the most simplistic level.

Imagine how incredibly complex this was for programmers developing on the early pre-Windows PC architecture, then. Each programmer needed to develop their own way of reading the keyboard or detecting whether a joystick was even attached, let alone being used to play the game. Specific routines were needed even to display the simplest of images on the screen or play a simple sound.

Essentially, the game programmers were talking directly to your PC’s hardware at a fundamental level. When Microsoft introduced Windows, it was imperative for the stability and success of the PC platform that things were made easier for both the developer and the player. After all, who would bother writing games for a machine when they had to reinvent the wheel every time they began work on a new game? Microsoft’s idea was simple: stop programmers talking directly to the hardware, and build a common toolkit which they could use instead. DirectX was born.

How it works

At the most basic level, DirectX is an interface between the hardware in your PC and Windows itself, part of the Windows API or Application Programming Interface. Let’s look at a practical example. When a game developer wants to play a sound file, it’s simply a case of using the correct library function. When the game runs, this calls the DirectX API, which in turn plays the sound file. The developer doesn’t need to know what type of sound card he’s dealing with, what it’s capable of, or how to talk to it. Microsoft has provided DirectX, and the sound card manufacturer has provided a DirectX-capable driver. He asks for the sound to be played, and it is – whichever machine it runs on.

From our point of view as gamers, DirectX also makes things incredibly easy – at least in theory. You install a new sound card in place of your old one, and it comes with a DirectX driver. Next time you play your favourite game you can still hear sounds and music, and you haven’t had to make any complex configuration changes.

Originally, DirectX began life as a simple toolkit: early hardware was limited and only the most basic graphical functions were required. As hardware and software has evolved in complexity, so has DirectX. It’s now much more than a graphical toolkit, and the term has come to encompass a massive selection of routines which deal with all sorts of hardware communication. For example, the DirectInput routines can deal with all sorts of input devices, from simple two-button mice to complex flight joysticks. Other parts include DirectSound for audio devices and DirectPlay provides a toolkit for online or multiplayer gaming.

DirectX versions

The current version of DirectX at time of writing is DirectX 9.0. This runs on all versions of Windows from Windows 98 up to and including Windows Server 2003 along with every revision in between. It doesn’t run on Windows 95 though: if you have a machine with Windows 95 installed, you’re stuck with the older and less capable 8.0a. Windows NT 4 also requires a specific version – in this case, it’s DirectX 3.0a.

With so many versions of DirectX available over the years, it becomes difficult to keep track of which version you need. In all but the most rare cases, all versions of DirectX are backwardly compatible – games which say they require DirectX 7 will happily run with more recent versions, but not with older copies. Many current titles explicitly state that they require DirectX 9, and won’t run without the latest version installed. This is because they make use of new features introduced with this version, although it has been known for lazy developers to specify the very latest version as a requirement when the game in question doesn’t use any of the new enhancements.

Generally speaking though, if a title is version locked like this, you will need to upgrade before you can play. Improvements to the core DirectX code mean you may even see improvements in many titles when you upgrade to the latest build of DirectX. Downloading and installing DirectX need not be complex, either.

Upgrading DirectX

All available versions of Windows come with DirectX in one form or another as a core system component which cannot be removed, so you should always have at least a basic implementation of the system installed on your PC. However, many new games require the very latest version before they work properly, or even at all.

Generally, the best place to install the latest version of DirectX from is the dedicated section of the Microsoft Web site, which is found at www.microsoft.com/windows/directx. As we went to press, the most recent build available for general download was DirectX 9.0b. You can download either a simple installer which will in turn download the components your system requires as it installs, or download the complete distribution package in one go for later offline installation.

Another good source for DirectX is games themselves. If a game requires a specific version, it’ll be on the installation CD and may even be installed automatically by the game’s installer itself. You won’t find it on magazine cover discs though, thanks to Microsoft’s licensing terms.

Diagnosing problems

Diagnosing problems with a DirectX installation can be problematic, especially if you don’t know which one of the many components is causing your newly purchased game to fall over. Thankfully, Microsoft provides a useful utility called the DirectX Diagnostic Tool, although this isn’t made obvious. You won’t find this tool in the Start Menu with any version of Windows, and each tends to install it in a different place.

The easiest way to use it is to open the Start Menu’s Run dialog, type in dxdiag and then click OK. When the application first loads, it takes a few seconds to interrogate your DirectX installation and find any problems. First, the DirectX Files tab displays version information on each one of the files your installation uses. The Notes section at the bottom is worth checking, as missing or corrupted files will be flagged here.

The tabs marked Display, Sound, Music, Input and Network all relate to specific areas of DirectX, and all but the Input tab provide tools to test the correct functioning on your hardware. Finally, the More Help tab provides a useful way to start the DirectX Troubleshooter, Microsoft’s simple linear problem solving tool for many common DirectX issues.

Stupid htaccess Tricks

Stupid htaccess Tricks

By Jeff Starr on Tuesday, January 10, 2006

Welcome to Perishable Press! This article, Stupid htaccess Tricks, covers just about every htaccess “trick” in the book, and is easily the site’s most popular offering. In addition to this htaccess article, you may also want to explore the rapidly expanding htaccess tag archive. Along with all things htaccess, Perishable Press also focuses on (X)HTML, CSS, PHP, JavaScript, security, and just about every other aspect of web design, blogging, and online success. If these topics are of interest to you, I encourage you to subscribe to Perishable Press for a periodic dose of online enlightenment ;)

Table of Contents

[ General ]
1. htaccess definition
2. htaccess comments
3. important information
4. performance issues
5. regex character definitions
6. redirection header codes

[ Essentials ]
1. htaccess comments
2. enable basic rewriting
3. enable symbolic links
4. enable AllowOverride
5. rename the htaccess file
6. retain httpd.conf rules

[ Performance ]
1. disable AllowOverride
2. pass the character set
3. preserve bandwidth
4. disable the server signature
5. set the server timezone
6. set admin email address
7. enable file caching
8. set default language & character set
9. declare specific/additional MIME types
10. send headers without meta tags
11. limit request methods to GET/PUT
12. process files according to request method
13. execute various file types via CGI script

[ Security ]
1. prevent access to htaccess
2. prevent access to any file
3. prevent acess to multiple file types
4. prevent unauthorized directory browsing
5. change the default index page
6. disguise script extensions
7. limit access to the LAN
8. secure directories by IP or domain
9. deny/allow domain access for IP range
10. deny/allow multiple IP addresses on one line
11. miscellaneous rules for blocking/allowing
12. stop hotlinking, serve alternate content
13. block robots, rippers, and offline browsers
14. more stupid blocking tricks
15. even more scum-blocking tricks
16. password-protect directories
17. password-protect files, directories, and more
18. require SSL (secure sockets layer)
19. automatically CHMOD various file types
20. disguise all file extensions
21. limit file upload size
22. disable script execution

[ Usability ]
1. minimize CSS image flicker in IE6
2. deploy custom error pages
3. provide a universal error document
4. employ basic URL spelling check
5. force media downloads
6. display file source code
7. redirect visitors during site development
8. provide password-prompt during site development
9. prevent access during specified time periods

[ Redirects ]
1. important note about redirecting via mod_rewrite
2. redirect from www-domain to non-www-domain
3. redirect from an old domain to a new domain
4. redirect string variations to a specific address
5. other fantastic redirect tricks
6. send visitors to a subdomain
7. more fun with RewriteCond & RewriteRule
8. more fun with Redirect 301 & RedirectMatch 301

[ WordPress ]
1. secure wordPress contact forms
2. wordpress permalinks

[ Random ]
1. activate SSI for HTML/SHTML file types
2. grant CGI access in a specific directory
3. disable magic_quotes_gpc for PHP enabled servers
4. enable MD5 digests
5. expression engine tricks

[ References ]



.htaccess Definition1 [ ^ ]

Apache server software provides distributed (i.e., directory-level) configuration via Hypertext Access files. These .htaccess files enable the localized fine-tuning of Apache’s universal system-configuration directives, which are defined in Apache’s main configuration file. The localized .htaccess directives must operate from within a file named .htaccess. The user must have appropriate file permissions to access and/or edit the .htaccess file. Further, .htaccess file permissions should never allow world write access — a secure permissions setting is “644”, which allows universal read access and user-only write access. Finally, .htaccess rules apply to the parent directory and all subdirectories. Thus to apply configuration rules to an entire website, place the .htaccess file in the root directory of the site.

Commenting .htaccess Code [ ^ ]

Comments are essential to maintaining control over any involved portion of code. Comments in .htaccess code are fashioned on a per-line basis, with each line of comments beginning with a pound sign #. Thus, comments spanning multiple lines in the .htaccess file require multiple pound signs. Further, due to the extremely volatile nature of htaccess voodoo, it is wise to include only alphanumeric characters (and perhaps a few dashes and underscores) in any .htaccess comments.

Important Notes for .htaccess Noobs [ ^ ]

As a configuration file, .htaccess is very powerful. Even the slightest syntax error (like a missing space) can result in severe server malfunction. Thus it is crucial to make backup copies of everything related to your site (including any original .htaccess files) before working with your Hypertext Access file(s). It is also important to check your entire website thoroughly after making any changes to your .htaccess file. If any errors or other problems are encountered, employ your backups immediately to restore original functionality.

Performance Issues [ ^ ]

.htaccess directives provide directory-level configuration without requiring access to Apache’s main server cofiguration file (httpd.conf). However, due to performance and security concerns, the main configuration file should always be used for server directives whenever possible. For example, when a server is configured to process .htaccess directives, Apache must search every directory within the domain and load any and all .htaccess files upon every document request. This results in increased page processing time and thus decreases performance. Such a performance hit may be unnoticeable for sites with light traffic, but becomes a more serious issue for more popular websites. Therefore, .htaccess files should only be used when the main server configuration file is inaccessible. See the “Performance Tricks” section of this article for more information.

Regex Character Definitions for htaccess2 [ ^ ]

#
the # instructs the server to ignore the line. used for including comments. each line of comments requires it’s own #. when including comments, it is good practice to use only letters, numbers, dashes, and underscores. this practice will help eliminate/avoid potential server parsing errors.
[F]
Forbidden: instructs the server to return a 403 Forbidden to the client.
[L]
Last rule: instructs the server to stop rewriting after the preceding directive is processed.
[N]
Next: instructs Apache to rerun the rewrite rule until all rewriting directives have been achieved.
[G]
Gone: instructs the server to deliver Gone (no longer exists) status message.
[P]
Proxy: instructs server to handle requests by mod_proxy
[C]
Chain: instructs server to chain the current rule with the previous rule.
[R]
Redirect: instructs Apache to issue a redirect, causing the browser to request the rewritten/modified URL.
[NC]
No Case: defines any associated argument as case-insensitive. i.e., "NC" = "No Case".
[PT]
Pass Through: instructs mod_rewrite to pass the rewritten URL back to Apache for further processing.
[OR]
Or: specifies a logical "or" that ties two expressions together such that either one proving true will cause the associated rule to be applied.
[NE]
No Escape: instructs the server to parse output without escaping characters.
[NS]
No Subrequest: instructs the server to skip the directive if internal sub-request.
[QSA]
Append Query String: directs server to add the query string to the end of the expression (URL).
[S=x]
Skip: instructs the server to skip the next "x" number of rules if a match is detected.
[E=variable:value]
Environmental Variable: instructs the server to set the environmental variable "variable" to "value".
[T=MIME-type]
Mime Type: declares the mime type of the target resource.
[]
specifies a character class, in which any character within the brackets will be a match. e.g., [xyz] will match either an x, y, or z.
[]+
character class in which any combination of items within the brackets will be a match. e.g., [xyz]+ will match any number of x’s, y’s, z’s, or any combination of these characters.
[^]
specifies not within a character class. e.g., [^xyz] will match any character that is neither x, y, nor z.
[a-z]
a dash (-) between two characters within a character class ([]) denotes the range of characters between them. e.g., [a-zA-Z] matches all lowercase and uppercase letters from a to z.
a{n}
specifies an exact number, n, of the preceding character. e.g., x{3} matches exactly three x’s.
a{n,}
specifies n or more of the preceding character. e.g., x{3,} matches three or more x’s.
a{n,m}
specifies a range of numbers, between n and m, of the preceding character. e.g., x{3,7} matches three, four, five, six, or seven x’s.
()
used to group characters together, thereby considering them as a single unit. e.g., (perishable)?press will match press, with or without the perishable prefix.
^
denotes the beginning of a regex (regex = regular expression) test string. i.e., begin argument with the proceeding character.
$
denotes the end of a regex (regex = regular expression) test string. i.e., end argument with the previous character.
?
declares as optional the preceding character. e.g., monzas? will match monza or monzas, while mon(za)? will match either mon or monza. i.e., x? matches zero or one of x.
!
declares negation. e.g., “!string” matches everything except “string”.
.
a dot (or period) indicates any single arbitrary character.
-
instructs “not to” rewrite the URL, as in “...domain.com.* - [F]”.
+
matches one or more of the preceding character. e.g., G+ matches one or more G’s, while "+" will match one or more characters of any kind.
*
matches zero or more of the preceding character. e.g., use “.*” as a wildcard.
|
declares a logical “or” operator. for example, (x|y) matches x or y.
\
escapes special characters ( ^ $ ! . * | ). e.g., use “\.” to indicate/escape a literal dot.
\.
indicates a literal dot (escaped).
/*
zero or more slashes.
.*
zero or more arbitrary characters.
^$
defines an empty string.
^.*$
the standard pattern for matching everything.
[^/.]
defines one character that is neither a slash nor a dot.
[^/.]+
defines any number of characters which contains neither slash nor dot.
http://
this is a literal statement — in this case, the literal character string, “http://”.
^domain.*
defines a string that begins with the term “domain”, which then may be proceeded by any number of any characters.
^domain\.com$
defines the exact string “domain.com”.
-d
tests if string is an existing directory
-f
tests if string is an existing file
-s
tests if file in test string has a non-zero value

Redirection Header Codes [ ^ ]

* 301 - Moved Permanently
* 302 - Moved Temporarily
* 403 - Forbidden
* 404 - Not Found
* 410 - Gone

Essentials [ ^ ]

Commenting your htaccess Files [ ^ ]

It is an excellent idea to consistenly and logically comment your htaccess files. Any line in an htaccess file that begins with the pound sign ( # ) tells the server to ignore it. Multiple lines require multiple pounds and use letters/numbers/dash/underscore only:

# this is a comment
# each line must have its own pound sign
# use only alphanumeric characters along with dashes - and underscores _

Enable Basic Rewriting [ ^ ]

Certain servers may not have “mod_rewrite” enabled by default. To ensure mod_rewrite (basic rewriting) is enabled throughout your site, add the following line once to your site’s root htaccess file:

# enable basic rewriting
RewriteEngine on

Enable Symbolic Links [ ^ ]

Enable symbolic links (symlinks) by adding the following directive to the target directory’s htaccess file. Note: for the FollowSymLinks directive to function, AllowOverride Options privileges must be enabled from within the server configuration file (see proceeding paragraph for more information):

# enable symbolic links
Options +FollowSymLinks

Enable AllowOverride [ ^ ]

For directives that require AllowOverride in order to function, such as FollowSymLinks (see above paragraph), the following directive must be added to the server configuration file. For performance considerations, it is important to only enable AllowOverride in the specific directory or directories in which it is required. In the following code chunk, we are enabling the AllowOverride privs only in the specified directory (/www/replace/this/with/actual/directory). Refer to this section for more information about AllowOverride and performance enhancement:

# enable allowoverride privileges

AllowOverride Options


Rename the htaccess File [ ^ ]

Not every system enjoys the extension-only format of htaccess files. Fortunately, you can rename them to whatever you wish, granted the name is valid on your system. Note: This directive must be placed in the server-wide configuration file or it will not work:

# rename htaccess files
AccessFileName ht.access

Note: If you rename your htaccess files, remember to update any associated configuration settings. For example, if you are protecting your htaccess file via FilesMatch, remember to inform it of the renamed files:

# protect renamed htaccess files

Order deny,allow
Deny from all


Retain Rules Defined in httpd.conf [ ^ ]

Save yourself time and effort by defining replicate rules for multiple virtual hosts once and only once via your httpd.conf file. Then, simply instruct your target htaccess file(s) to inheret the httpd.conf rules by including this directive:

RewriteOptions Inherit

Performance [ ^ ]

Improving Performance via AllowOverride [ ^ ]

Limit the extent to which htaccess files decrease performance by enabling AllowOverride only in required directories. For example, if AllowOverride is enabled throughout the entire site, the server must dig through every directory, searching for htaccess files that may not even exist. To prevent this, we disable the AllowOverride in the site’s root htaccess file and then enable AllowOverride only in required directories via the server config file (refer to this section for more information). Note: if you do not have access to your site’s server config file and also need AllowOverride privileges, do not use this directive:

# increase performance by disabling allowoverride
AllowOverride None

Improving Performance by Passing the Character Set [ ^ ]

Prevent certain 500 error displays by passing the default character set parameter before you get there. Note: replace the “utf-8” below with the charset that your site is using:

# pass the default character set
AddDefaultCharset utf-8

Improving Performance by Preserving Bandwidth [ ^ ]

To increase performance on PHP enabled servers, add the following directive:

# preserve bandwidth for PHP enabled servers

php_value zlib.output_compression 16386


Disable the Server Signature [ ^ ]

Here we are disabling the digital signature that would otherwise identify the server:

# disable the server signature
ServerSignature Off

Set the Server Timezone [ ^ ]

Here we are instructing the server to synchronize chronologically according to the time zone of some specified state:

# set the server timezone
SetEnv TZ America/Washington

Set the Email Address for the Server Administrator [ ^ ]

Here we are specifying the default email address for the server administrator:

# set the server administrator email
SetEnv SERVER_ADMIN default@domain.com

Improve Site Transfer Speed by Enabling File Caching [ ^ ]

The htaccess genius over at askapache.com explains how to dramatically improve your site’s transfer speed by enabling file caching 3. Using time in seconds* to indicate the duration for which cached content should endure, we may generalize the htaccess rules as such (edit file types and time value to suit your needs):

# cache images and flash content for one month

Header set Cache-Control "max-age=2592000"


# cache text, css, and javascript files for one week

Header set Cache-Control "max-age=604800"


# cache html and htm files for one day

Header set Cache-Control "max-age=43200"


# implement minimal caching during site development

Header set Cache-Control "max-age=5"


# explicitly disable caching for scripts and other dynamic files

Header unset Cache-Control


# alternate method for file caching
ExpiresActive On
ExpiresDefault A604800 # 1 week
ExpiresByType image/x-icon A2419200 # 1 month
ExpiresByType application/x-javascript A2419200 # 1 month
ExpiresByType text/css A2419200 # 1 month
ExpiresByType text/html A300 # 5 minutes
# disable caching for scripts and other dynamic files

ExpiresActive Off


* * Convert common time intervals into seconds:
* 300 = 5 minutes
* 2700 = 45 minutes
* 3600 = 1 hour
* 54000 = 15 hours
* 86400 = 1 day
* 518400 = 6 days
* 604800 = 1 week
* 1814400 = 3 weeks
* 2419200 = 1 month
* 26611200 = 11 months
* 29030400 = 1 year = never expires

Set the default language and character set [ ^ ]

Here is an easy way to set the default language for pages served by your server (edit the language to suit your needs):

# set the default language
DefaultLanguage en-US

Likewise, here we are setting the default character set (edit to taste):

# set the default character set
AddDefaultCharset UTF-8

Declare specific/additional MIME types [ ^ ]

# add various mime types
AddType application/x-shockwave-flash .swf
AddType video/x-flv .flv
AddType image/x-icon .ico

Send character set and other headers without meta tags [ ^ ]

# send the language tag and default character set
# AddType 'text/html; charset=UTF-8' html
AddDefaultCharset UTF-8
DefaultLanguage en-US

Limit server request methods to GET and PUT [ ^ ]

# limit server request methods to GET and PUT
Options -ExecCGI -Indexes -All
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD) RewriteRule .* - [F]

Selectively process files according to server request method [ ^ ]

# process files according to server request method
Script PUT /cgi-bin/upload.cgi
Script GET /cgi-bin/download.cgi

Execute various file types through a cgi script [ ^ ]

For those special occasions where certain file types need to be processed with some specific cgi script, let em know who sent ya:

# execute all png files via png-script.cgi
Action image/png /cgi-bin/png-script.cgi
Security [ ^ ]

Prevent Acess to .htaccess [ ^ ]

Add the following code block to your htaccess file to add an extra layer of security. Any attempts to access the htaccess file will result in a 403 error message. Of course, your first layer of defense to protect htaccess files involves setting htaccess file permissions via CHMOD to 644:

# secure htaccess file

order allow,deny
deny from all


Prevent Acess to a Specific File [ ^ ]

To restrict access to a specific file, add the following code block and edit the file name, “secretfile.jpg”, with the name of the file that you wish to protect:

# prevent viewing of a specific file

order allow,deny
deny from all


Prevent acess to multiple file types [ ^ ]

To restrict access to a variety of file types, add the following code block and edit the file types within parentheses to match the extensions of any files that you wish to protect:


Order Allow,Deny
Deny from all


Prevent Unauthorized Directory Browsing [ ^ ]

Prevent unauthorized directory browsing by instructing the server to serve a “xxx Forbidden - Authorization Required” message for any request to view a directory. For example, if your site is missing it’s default index page, everything within the root of your site will be accessible to all visitors. To prevent this, include the following htaccess rule:

# disable directory browsing
Options All -Indexes

Conversely, to enable directory browsing, use the following directive:

# enable directory browsing
Options All +Indexes

Likewise, this rule will prevent the server from listing directory contents:

# prevent folder listing
IndexIgnore *

And, finally, the IndexIgnore directive may be used to prevent the display of select file types:

# prevent display of select file types
IndexIgnore *.wmv *.mp4 *.avi *.etc

Change Default Index Page [ ^ ]

This rule tells the server to search for and serve “business.html” as the default directory index. This rule must exist in the htaccess files of the root directory for which you wish to replace the default index file (e.g., “index.html”):

# serve alternate default index page
DirectoryIndex business.html

This rule is similar, only in this case, the server will scan the root directory for the listed files and serve the first match it encounters. The list is read from left to right:

# serve first available alternate default index page from series
DirectoryIndex filename.html index.cgi index.pl default.htm

Disguise Script Extensions [ ^ ]

To enhance security, disguise scripting languages by replacing actual script extensions with dummy extensions of your choosing. For example, to change the “.foo” extension to “.php”, add the following line to your htaccess file and rename all affected files accordingly:

# serve foo files as php files
AddType application/x-httpd-php .foo

# serve foo files as cgi files
AddType application/x-httpd-cgi .foo

Limit Access to the Local Area Network (LAN) [ ^ ]

# limit access to local area network

order deny,allow
deny from all
allow from 192.168.0.0/33


Secure Directories by IP Address and/or Domain [ ^ ]

In the following example, all IP addresses are allowed access except for 12.345.67.890 and domain.com:

# allow all except those indicated here

order allow,deny
allow from all
deny from 12.345.67.890
deny from .*domain\.com.*


In the following example, all IP addresses are denied access except for 12.345.67.890 and domain.com:

# deny all except those indicated here

order deny,allow
deny from all
allow from 12.345.67.890
allow from .*domain\.com.*


This is how to block unwanted visitors based on the referring domain. You can also save bandwidth by blocking specific file types — such as .jpg, .zip, .mp3, .mpg — from specific referring domains. Simply replace “scumbag” and “wormhole” with the offending domains of your choice:

# block visitors referred from indicated domains

RewriteEngine on
RewriteCond %{HTTP_REFERER} scumbag\.com [NC,OR]
RewriteCond %{HTTP_REFERER} wormhole\.com [NC,OR]
RewriteRule .* - [F]


Prevent or allow domain access for a specified range of IP addresses [ ^ ]

There are several effective ways to block a range of IP addresses via htaccess. This first method blocks an IP range specified by thier CIDR (Classless Inter-Domain Routing) number. This method is useful for blocking mega-spammers such as RIPE, Optinet, and others. If, for example, you find yourself adding line after line of Apache deny directives for addresses beginning with the same first few numbers, choose one of them and try a whois lookup. Listed within the whois results will be the CIDR value representing every IP address associated with that particular network. Thus, blocking via CIDR is an effective way to eloquently prevent all IP instances of the offender from accessing your site. Here is a generalized example for blocking by CIDR (edit values to suit your needs):

# block IP range by CIDR number

order allow,deny
allow from all
deny from 10.1.0.0/16
deny from 80.0.0/8


Likewise, to allow an IP range by CIDR number:

# allow IP range by CIDR number

order deny,allow
deny from all
allow from 10.1.0.0/16
allow from 80.0.0/8


Another effective way to block an entire range of IP addresses involves truncating digits until the desired range is represented. As an IP address is read from left to right, its value represents an increasingly specific address. For example, a fictitious IP address of 99.88.77.66 would designate some uniquely specific IP address. Now, if we remove the last two digits (66) from the address, it would represent any address beginning with the remaining digits. That is, 99.88.77 represents 99.88.77.1, 99.88.77.2, … 99.88.77.99, …etc. Likewise, if we then remove another pair of digits from the address, its range suddenly widens to represent every IP address 99.88.x.y, where x and y represent any valid set of IP address values (i.e., you would block 256*256 = 65,536 unique IP addresses). Following this logic, it is possible to block an entire range of IP addresses to varying degrees of specificity. Here are few generalized lines exemplifying proper htaccess syntax (edit values to suit your needs):

# block IP range by address truncation

order allow,deny
allow from all
deny from 99.88.77.66
deny from 99.88.77.*
deny from 99.88.*.*
deny from 99.*.*.*


Likewise, to allow an IP range by address truncation:

# allow IP range by address truncation

order deny,allow
deny from all
allow from 99.88.77.66
allow from 99.88.77.*
allow from 99.88.*.*
allow from 99.*.*.*


Block or allow multiple IP addresses on one line [ ^ ]

Save a little space by blocking multiple IP addresses or ranges on one line. Here are few examples (edit values to suit your needs):

# block two unique IP addresses
deny from 99.88.77.66 11.22.33.44
# block three ranges of IP addresses
deny from 99.88 99.88.77 11.22.33

Likewise, to allow multiple IP addresses or ranges on one line:

# allow two unique IP addresses
allow from 99.88.77.66 11.22.33.44
# allow three ranges of IP addresses
allow from 99.88 99.88.77 11.22.33

Miscellaneous rules for blocking and allowing IP addresses [ ^ ]

Here are few miscellaneous rules for blocking various types of IP addresses. These rules may be adapted to allow the specified IP values by simply changing the deny directive to allow. Check ’em out (edit values to suit your needs):

# block a partial domain via network/netmask values
deny from 99.1.0.0/255.255.0.0

# block a single domain
deny from 99.88.77.66

# block domain.com but allow sub.domain.com
order deny,allow
deny from domain.com
allow from sub.domain.com

Stop Hotlinking, Serve Alternate Content [ ^ ]

To serve ‘em some unexpected alternate content when hotlinking is detected, employ the following code, which will protect all files of the types included in the last line (add more types as needed). Remember to replace the dummy path names with real ones. Also, the name of the nasty image being served in this case is “eatme.jpe”, as indicated in the line containing the RewriteRule. Please advise that this method will also block services such as FeedBurner from accessing your images.

# stop hotlinking and serve alternate content

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.com/.*$ [NC]
RewriteRule .*\.(gif|jpg)$ http://www.domain.com/eatme.jpe [R,NC,L]


Note: To deliver a standard (or custom, if configured) error page instead of some nasty image of the Fonz, replace the line containing the RewriteRule in the above htaccess directive with the following line:

# serve a standard 403 forbidden error page
RewriteRule .*\.(gif|jpg)$ - [F,L]

Note: To grant linking permission to a site other than yours, insert this code block after the line containing the “domain.com” string. Remember to replace “goodsite.com” with the actual site domain:

# allow linking from the following site
RewriteCond %{HTTP_REFERER} !^http://(www\.)?goodsite\.com/.*$ [NC]

Block Evil Robots, Site Rippers, and Offline Browsers [ ^ ]

Eliminate some of the unwanted scum from your userspace by injecting this handy block of code. After such, any listed agents will be denied access and receive an error message instead. Please advise that there are much more comprehensive lists available this example has been truncated for business purposes. Note: DO NOT include the “[OR]” on the very last RewriteCond or your server will crash, delivering “500 Errors” to all page requests.

# deny access to evil robots site rippers offline browsers and other nasty scum
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR]
RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR]
RewriteCond %{HTTP_USER_AGENT} ^attach [OR]
RewriteCond %{HTTP_USER_AGENT} ^autoemailspider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* - [F,L]

Or, instead of delivering a friendly error message (i.e., the last line), send these bad boys to the hellish website of your choice by replacing the RewriteRule in the last line with one of the following two examples:

# send em to a hellish website of your choice
RewriteRule ^.*$ http://www.hellish-website.com [R,L]

Or, to send em to a virtual blackhole of fake email addresses:

# send em to a virtual blackhole of fake email addresses
RewriteRule ^.*$ http://english-61925045732.spampoison.com [R,L]

You may also include specific referrers to your blacklist by using HTTP_REFERER. Here, we use the infamously scummy domain, “iaea.org” as our blocked example, and we use “yourdomain” as your domain (the domain to which you are blocking iaea.org):

RewriteCond %{HTTP_REFERER} ^http://www.iaea.org$
RewriteRule !^http://[^/.]\.yourdomain\.com.* - [F,L]

More Stupid Blocking Tricks [ ^ ]

Note: Although these redirect techniques are aimed at blocking and redirecting nasty scumsites, the directives may also be employed for friendly redirection purposes:

# redirect any request for anything from spamsite to differentspamsite
RewriteCond %{HTTP_REFERER} ^http://.*spamsite.*$ [NC]
RewriteRule .* http://www.differentspamsite.com [R]

# redirect all requests from spamsite to an image of something at differentspamsite
RewriteCond %{HTTP_REFERER} ^http://.*spamsite.*$ [NC]
RewriteRule .* http://www.differentspamsite/something.jpg [R]

# redirect traffic from a certain address or range of addresses to another site
RewriteCond %{REMOTE_ADDR} 192.168.10.*
RewriteRule .* http://www.differentspamsite.com/index.html [R]

Even More Scum-Blocking Tricks [ ^ ]

Here is a step-by-step series of code blocks that should equip you with enough knowledge to block any/all necessary entities. Read through the set of code blocks, observe the patterns, and then copy, combine and customize to suit your specific scum-blocking needs:

# set variables for user agents and referers and ip addresses
SetEnvIfNoCase User-Agent ".*(user-agent-you-want-to-block|php/perl).*" BlockedAgent
SetEnvIfNoCase Referer ".*(block-this-referrer|and-this-referrer|and-this-referrer).*" BlockedReferer
SetEnvIfNoCase REMOTE_ADDR ".*(666.666.66.0|22.22.22.222|999.999.99.999).*" BlockedAddress

# set variable for any class B network coming from a given netblock
SetEnvIfNoCase REMOTE_ADDR "66.154.*" BlockedAddress

# set variable for two class B networks 198.25.0.0 and 198.26.0.0
SetEnvIfNoCase REMOTE_ADDR "198.2(5|6)\..*" BlockedAddress

# deny any matches from above and send a 403 denied

order deny,allow
deny from env=BlockedAgent
deny from env=BlockedReferer
deny from env=BlockedAddress
allow from all


Password-Protect Directories [ ^ ]

Here is an excellent online tool for generating the necessary elements for a password-protected directory:

# password protect directories
htaccess Password Generator

Password-protect Files, Directories, and More.. [ ^ ]

Secure site contents by requiring user authentication for specified files and/or directories. The first example shows how to password-protect any single file type that is present beneath the directory which houses the htaccess rule. The second rule employs the FilesMatch directive to protect any/all files which match any of the specified character strings. The third rule demonstrates how to protect an entire directory. The fourth set of rules provides password-protection for all IP’s except those specified. Remember to edit these rules according to your specific needs.

# password-protect single file

AuthType Basic
AuthName "Prompt"
AuthUserFile /home/path/.htpasswd
Require valid-user


# password-protect multiple files

AuthType basic
AuthName "Development"
AuthUserFile /home/path/.htpasswd
Require valid-user


# password-protect the directory in which this htaccess rule resides
AuthType basic
AuthName "This directory is protected"
AuthUserFile /home/path/.htpasswd
AuthGroupFile /dev/null
Require valid-user

# password-protect directory for every IP except the one specified
# place in htaccess file of a directory to protect that entire directory
AuthType Basic
AuthName "Personal"
AuthUserFile /home/path/.htpasswd
Require valid-user
Allow from 99.88.77.66
Satisfy Any

Require SSL (Secure Sockets Layer) [ ^ ]

Here is an excellent method for requiring SSL (via askapache.com 3):

# require SSL
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq "domain.tld"
ErrorDocument 403 https://domain.tld

# require SSL without mod_ssl
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

Automatically CHMOD Various File Types [ ^ ]

This method is great for ensuring the CHMOD settings for various file types. Employ the following rules in the root htaccess file to affect all specified file types, or place in a specific directory to affect only those files (edit file types according to your needs):

# ensure CHMOD settings for specified file types
# remember to never set CHMOD 777 unless you know what you are doing
# files requiring write access should use CHMOD 766 rather than 777
# keep specific file types private by setting their CHMOD to 400
chmod .htpasswd files 640
chmod .htaccess files 644
chmod php files 600

Disguise all file extensions [ ^ ]

This method will disguise all file types (i.e., any file extension) and present them as .php files (or whichever extension you choose):

# diguise all file extensions as php
ForceType application/x-httpd-php

Protect against denial-of-service (DOS) attacks by limiting file upload size [ ^ ]

One method to help protect your server against DOS attacks involves limiting the maximum allowable size for file uploads. Here, we are limiting file upload size to 10240000 bytes, which is equivalent to around 10 megabytes. For this rule, file sizes are expressed in bytes. Check here for help with various file size conversions. Note: this code is only useful if you actually allow users to upload files to your site.

# protect against DOS attacks by limiting file upload size
LimitRequestBody 10240000

Secure directories by disabling execution of scripts [ ^ ]

Prevent malicious brainiacs from actively scripting secure directories by adding the following rules to the representative htaccess file (edit file types to suit your needs):

# secure directory by disabling script execution
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI
Usability Tricks [ ^ ]

Minimize CSS Image Flicker in IE6 [ ^ ]

Add the following htaccess rules to minimize or even eliminate CSS background-image “flickering” in MSIE6:

# minimize image flicker in IE6
ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/png A2592000

Deploy Custom Error Pages [ ^ ]

Replicate the following patterns to serve your own set of custom error pages. Simply replace the “/errors/###.html” with the correct path and file name. Also change the “###” preceding the path to summon pages for other errors. Note: your custom error pages must be larger than 512 bytes in size or they will be completely ignored by Internet Explorer:

# serve custom error pages
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html

Provide a Universal Error Document [ ^ ]

# provide a universal error document
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /dir/error.php [L]

Employ Basic URL Spelling Check [ ^ ]

This bit of voodoo will auto-correct simple spelling errors in the URL:

# automatically corect simple speling erors

CheckSpelling On


Instruct browser to download multimedia files rather than display them [ ^ ]

Here is a useful method for delivering multimedia file downloads to your users. Typically, browsers will attempt to play or stream such files when direct links are clicked. With this method, provide a link to a multimedia file and a dialogue box will provide users the choice of saving the file or opening it. Here are a few htaccess rules demonstrating the technique (edit file types according to your specific needs):

# instruct browser to download multimedia files
AddType application/octet-stream .avi
AddType application/octet-stream .mpg
AddType application/octet-stream .wmv
AddType application/octet-stream .mp3

Instruct server to display source code for dynamic file types [ ^ ]

There are many situations where site owners may wish to display the contents of a dynamic file rather than executing it as a script. To exercise this useful technique, create a directory in which to place dynamic files that should be displayed rather than executed, and add the following line of code to the htaccess file belonging to that directory. This method is known to work for .pl, .py, and .cgi file-types. Here it is:

RemoveHandler cgi-script .pl .py .cgi

Redirect visitors to a temporary site during site development [ ^ ]

During web development, maintenance, or repair, send your visitors to an alternate site while retaining full access for yourself. This is a very useful technique for preventing visitor confusion or dismay during those awkward, web-development moments. Here are the generalized htaccess rules to do it (edit values to suit your needs):

# redirect all visitors to alternate site but retain full access for you
ErrorDocument 403 http://www.alternate-site.com
Order deny,allow
Deny from all
Allow from 99.88.77.66

Provide a password prompt for visitors during site development [ ^ ]

Here is another possible solution for "hiding" your site during those private, site-under-construction moments. Here we are instructing Apache to provide visitors with a password prompt while providing open access to any specifically indicated IP addresses or URL’s. Edit the following code according to your IP address and other development requirements (thanks to Caleb at askapache.com for sharing this trick 3):

# password prompt for visitors
AuthType basic
AuthName "This site is currently under construction"
AuthUserFile /home/path/.htpasswd
AuthGroupFile /dev/null
Require valid-user
# allow webmaster and any others open access
Order Deny,Allow
Deny from all
Allow from 111.222.33.4
Allow from favorite.validation/services/
Allow from googlebot.com
Satisfy Any

Prevent file or directory access according to specified time periods [ ^ ]

Prevent viewing of all pictures of Fonzi during the midnight hour — or any files during any time period — by using this handy htaccess ruleset:

# prevent access during the midnight hour
RewriteCond %{TIME_HOUR} ^12$
RewriteRule ^.*$ - [F,L]

# prevent access throughout the afternoon
RewriteCond %{TIME_HOUR} ^(12|13|14|15)$
RewriteRule ^.*$ - [F,L]
Redirect Tricks [ ^ ]

Important Note About Redirecting via mod_rewrite [ ^ ]

For all redirects using the mod_rewrite directive, it is necessary to have the RewriteEngine enabled. It is common practice to enable the mod_rewrite directive in either the server configuration file or at the top of the site’s root htaccess file. If the mod_rewrite directive is not included in either of these two places, it should be included as the first line in any code block that utilizes a rewrite function (i.e., mod_rewrite), but only needs to be included once for each htaccess file. The proper mod_rewrite directive is included here for your convenience, but may or may not also be included within some of the code blocks provided in this article:

# initialize and enable rewrite engine
RewriteEngine on

Redirect from http://www.domain.com to http://domain.com [ ^ ]

This method uses a “301 redirect” to establish a permanent redirect from the “www-version” of a domain to its respectively corresponding “non-www version”. Be sure to test immediately after preparing 301 redirects and remove it immediately if any errors occur. Use a “server header checker” to confirm a positive 301 response. Further, always include a trailing slash “/” when linking directories. Finally, be consistent with the “www” in all links (either use it always or never).

# permanently redirect from www domain to non-www domain
RewriteEngine on
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^www\.domain\.tld$ [NC]
RewriteRule ^(.*)$ http://domain.tld/$1 [R=301,L]

Redirect from http://old-domain.com to http://new-domain.com [ ^ ]

For a basic domain change from “old-domain.com” to “new-domain.com” (and folder/file names have not been changed), use the Rewrite rule to remap the old domain to the new domain. When checking the redirect live, the old domain may appear in the browser’s address bar. Simply check an image path (right-click an image and select “properties”) to verify proper redirection. Remember to check your site thoroughly after implementing this redirect.

# redirect from old domain to new domain
RewriteEngine On
RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L]

Redirect String Variations to a Specific Address [ ^ ]

For example, if we wanted to redirect any requests containing the character string, “perish”, to our main page at http://perishablepress.com/, we would replace “some-string” with “perish” in the following code block:

# redirect any variations of a specific character string to a specific address
RewriteRule ^some-string http://www.domain.com/index.php/blog/target [R]

Here are two other methods for accomplishing string-related mapping tasks:

# map URL variations to the same directory on the same server
AliasMatch ^/director(y|ies) /www/docs/target

# map URL variations to the same directory on a different server
RedirectMatch ^/[dD]irector(y|ies) http://domain.com

Other Fantastic Redirect Tricks [ ^ ]

Redirect an entire site via 301:

# redirect an entire site via 301
redirect 301 / http://www.domain.com/

Redirect a specific file via 301:

# redirect a specific file via 301
redirect 301 /current/currentfile.html http://www.newdomain.com/new/newfile.html

Redirect an entire site via permanent redirect:

# redirect an entire site via permanent redirect
Redirect permanent / http://www.domain.com/

Redirect a page or directory via permanent redirect:

# redirect a page or directory
Redirect permanent old_file.html http://www.new-domain.com/new_file.html
Redirect permanent /old_directory/ http://www.new-domain.com/new_directory/

Redirect a file using RedirectMatch:

# redirect a file using RedirectMatch
RedirectMatch 301 ^.*$ http://www.domain.com/index.html

Note: When redirecting specific files, use Apache‘s Redirect rule for files within the same domain. Use Apache‘s RewriteRule for any domains, especially if they are different. The RewriteRule is more powerful than the Redirect rule, and thus should serve you more effectively.

Thus, use the following for a stronger, harder page redirection (first line redirects a file, second line a directory, and third a domain):

# redirect files directories and domains via RewriteRule
RewriteRule http://old-domain.com/old-file.html http://new-domain.com/new-file.html
RewriteRule http://old-domain.com/old-dir/ http://new-domain.com/new-dir/
RewriteRule http://old-domain.com/ http://new-domain.com/

Send visitors to a subdomain [ ^ ]

This rule will ensure that all visitors are viewing pages via the subdomain of your choice. Edit the "subdomain", "domain", and "tld" to match your subdomain, domain, and top-level domain respectively:

# send visitors to a subdomain
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^subdomain\.domain\.com$ [NC]
RewriteRule ^/(.*)$ http://subdomain.domain.tld/$1 [L,R=301]

More fun with RewriteCond and RewriteRule [ ^ ]

# rewrite only if the file is not found
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)special\.html?$ cgi-bin/special/special-html/$1

# rewrite only if an image is not found
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule images/special/(.*).gif cgi-bin/special/mkgif?$1

# seo-friendly rewrite rules for various directories
RewriteRule ^(.*)/aud/(.*)$ $1/audio-files/$2 [L,R=301]
RewriteRule ^(.*)/img/(.*)$ $1/image-files/$2 [L,R=301]
RewriteRule ^(.*)/fla/(.*)$ $1/flash-files/$2 [L,R=301]
RewriteRule ^(.*)/vid/(.*)$ $1/video-files/$2 [L,R=301]

# broswer sniffing via htaccess environmental variables
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*
RewriteRule ^/$ /index-for-mozilla.html [L]
RewriteCond %{HTTP_USER_AGENT} ^Lynx.*
RewriteRule ^/$ /index-for-lynx.html [L]
RewriteRule ^/$ /index-for-all-others.html [L]

# redirect query to Google search
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_URI} .google\.php*
RewriteRule ^(.*)$ ^http://www.google.com/search?q=$1 [R,NC,L]

# deny request according to the request method
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|HEAD)$ [NC]
RewriteRule ^.*$ - [F]

# redirect uploads to a better place
RewriteCond %{REQUEST_METHOD} ^(PUT|POST)$ [NC]
RewriteRule ^(.*)$ /cgi-bin/upload-processor.cgi?p=$1 [L,QSA]

More fun with Redirect 301 and RedirectMatch 301 [ ^ ]

# seo friendly redirect for a single file
Redirect 301 /old-dir/old-file.html http://domain.com/new-dir/new-file.html

# seo friendly redirect for multiple files
# redirects all files in dir directory with first letters xyz
RedirectMatch 301 /dir/xyz(.*) http://domain.com/$1

# seo friendly redirect entire site to a different domain
Redirect 301 / http://different-domain.com

WordPress Tricks [ ^ ]

Secure WordPress Contact Forms [ ^ ]

Protect your insecure WordPress contact forms against online unrighteousness by verifying the domain from whence the form is called. Remember to replace the “domain.com” and “contact.php” with your domain and contact-form file names, respectively.

# secure wordpress contact forms via referrer check
RewriteCond %{HTTP_REFERER} !^http://www.domain.com/.*$ [NC]
RewriteCond %{REQUEST_POST} .*contact.php$
RewriteRule .* - [F]

WordPress Permalinks [ ^ ]

In our article, The htaccess rules for all WordPress Permalinks, we revealed the precise htaccess directives used by the WordPress blogging platform for permalink functionality. Here, for the sake of completeness, we repeat the directives only. For more details please refer to the original article:

If WordPress is installed in the site’s root directory, WordPress creates and uses the following htaccess directives:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

If WordPress is installed in some subdirectory “foo”, WordPress creates and uses the following htaccess directives:

# BEGIN WordPress

RewriteEngine On
RewriteBase /foo/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /foo/index.php [L]

# END WordPress

Random Tricks [ ^ ]

Activate SSI for HTML/SHTML file types: [ ^ ]

# activate SSI for HTML and or SHTML file types
AddType text/html .html
AddType text/html .shtml
AddHandler server-parsed .html
AddHandler server-parsed .shtml
AddHandler server-parsed .htm

Grant CGI access in a specific directory: [ ^ ]

# grant CGI access in a specific directory
Options +ExecCGI
AddHandler cgi-script cgi pl
# to enable all scripts in a directory use the following
SetHandler cgi-script

Disable magic_quotes_gpc for PHP enabled servers: [ ^ ]

# turn off magic_quotes_gpc for PHP enabled servers

php_flag magic_quotes_gpc off


Enable MD5 digests: [ ^ ]

Note: enabling this option may result in a relative decrease in server performance.

# enable MD5 digests via ContentDigest
ContentDigest On

Expression Engine Tricks: [ ^ ]

# send Atom and RSS requests to the site docroot to be rewritten for ExpressionEngine
RewriteRule .*atom.xml$ http://www.yoursite.com/index.php/weblog/rss_atom/ [R]
RewriteRule .*rss.xml$ http://www.yoursite.com/index.php/weblog/rss_2.0/ [R]

# cause all requests for index.html to be rewritten for ExpressionEngine
RewriteRule /.*index.html$ http://www.domain.com/index.php [R]

Source : Stupid htaccess Tricks

Friday, May 29, 2009

Boot WinXP Fast

Follow the following steps

1. Open notepad.exe, type "del c:\windows\prefetch\ntosboot-*.* /q" (without the quotes) & save as "ntosboot.bat" in c:\
2. From the Start menu, select "Run..." & type "gpedit.msc".
3. Double click "Windows Settings" under "Computer Configuration" and double click again on "Shutdown" in the right window.
4. In the new window, click "add", "Browse", locate your "ntosboot.bat" file & click "Open".
5. Click "OK", "Apply" & "OK" once again to exit.
6. From the Start menu, select "Run..." & type "devmgmt.msc".
7. Double click on "IDE ATA/ATAPI controllers"
8. Right click on "Primary IDE Channel" and select "Properties".
9. Select the "Advanced Settings" tab then on the device or 1 that doesn't have 'device type' greyed out select 'none' instead of 'autodetect' & click "OK".
10. Right click on "Secondary IDE channel", select "Properties" and repeat step 9.
11. Reboot your computer.

Change The Default Location For Installing Apps

As the size of hardrives increase, more people are using partitions to seperate and store groups of files.

XP uses the C:\Program Files directory as the default base directory into which new programs are installed. However, you can change the default installation drive and/ or directory by using a Registry hack.

Run the Registry Editor (regedit)and go to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

Look for the value named ProgramFilesDir. by default,this value will be C:\Program Files. Edit the value to any valid drive or folder and XP will use that new location as the default installation directory for new programs.

All About Movie Tags (what Is A Dvdrip, Cam Etc.)

Original Sources

CAM (Camera)
A cam is a theater rip usually done with a digital video camera. A mini tripod is sometimes used, but a lot of the time this wont be possible, so the camera make shake. Also seating placement isn't always idle, and it might be filmed from an angle. If cropped properly, this is hard to tell unless there's text on the screen, but a lot of times these are left with triangular borders on the top and bottom of the screen. Sound is taken from the onboard microphone of the camera, and especially in comedies, laughter can often be heard during the film. Due to these factors picture and sound quality are usually quite poor, but sometimes we're lucky, and the theater will be fairly empty and a fairly clear signal will be heard.


TS (TELESYNC)
A telesync is the same spec as a CAM except it uses an external audio source (most likely an audio jack in the chair for hard of hearing people). A direct audio source does not ensure a good quality audio source, as a lot of background noise can interfere. A lot of the times a telesync is filmed in an empty cinema or from the projection booth with a professional camera, giving a better picture quality. Quality ranges drastically, check the sample before downloading the full release. A high percentage of Telesyncs are CAMs that have been mislabeled.


TC (TELECINE)
A telecine machine copies the film digitally from the reels. Sound and picture should be very good, but due to the equipment involved and cost telecines are fairly uncommon. Generally the film will be in correct aspect ratio, although 4:3 telecines
have existed. A great example is the JURASSIC PARK 3 TC done last year. TC should not be confused with TimeCode , which is a visible counter on screen throughout the film.


SCR (SCREENER)
A pre VHS tape, sent to rental stores, and various other places for promotional use. A screener is supplied on a VHS tape, and is usually in a 4:3 (full screen) a/r, although letterboxed screeners are sometimes found. The main draw back is a "ticker" (a message that scrolls past at the bottom of the screen, with the copyright and anti-copy telephone number). Also, if the tape contains any serial numbers, or any other markings that could lead to the source of the tape, these will have to be blocked, usually with a black mark over the section. This is sometimes only for a few seconds, but unfortunately on some copies this will last for the entire film, and some can be quite big. Depending on the equipment used, screener quality can
range from excellent if done from a MASTER copy, to very poor if done on an old VHS recorder thru poor capture equipment on a copied tape. Most screeners are transferred to VCD, but a few attempts at SVCD have occurred, some looking better than others.


DVDscr (DVD-SCREENER)
Same premise as a screener, but transferred off a DVD. Usually letterbox , but without the extras that a DVD retail would contain. The ticker is not usually in the black bars, and will disrupt the viewing. If the ripper has any skill, a DVDscr should be very good. Usually transferred to SVCD or DivX/XviD.


DVDRip
A copy of the final released DVD. If possible this is released PRE retail (for example, Star Wars episode 2) again, should be excellent quality. DVDrips are released in SVCD and DivX/XviD.


VHSRip
Transferred off a retail VHS, mainly skating/sports videos and XXX releases.


TVRip
TV episode that is either from Network (capped using digital cable/satellite boxes are preferable) or PRE-AIR from satellite feeds sending the program around to networks a few days earlier (do not contain "dogs" but sometimes have flickers etc) Some programs such as WWF Raw Is War contain extra parts, and the "dark matches" and camera/commentary tests are included on the rips. PDTV is capped from a digital TV PCI card, generally giving the best results, and groups tend to release in SVCD for
these. VCD/SVCD/DivX/XviD rips are all supported by the TV scene.


WP (WORKPRINT)
A workprint is a copy of the film that has not been finished. It can be missing scenes, music, and quality can range from excellent to very poor. Some WPs are very different from the final print (Men In Black is missing all the aliens, and has actors in their places) and others can contain extra scenes (Jay and Silent Bob) . WPs can be nice additions to the collection once a good quality final has been obtained.


DivX Re-Enc
A DivX re-enc is a film that has been taken from its original VCD source, and re-encoded into a small DivX file. Most commonly found on file sharers, these are usually labeled something like Film.Name.Group(1of2) etc. Common groups are SMR and TND. These aren't really worth downloading, unless you're that unsure about a film u only want a 200mb copy of it. Generally avoid.


Watermarks
A lot of films come from Asian Silvers/PDVD (see below) and these are tagged by the people responsible. Usually with a letter/initials or a little logo, generally in one of the corners. Most famous are the "Z" "A" and "Globe" watermarks.


PDVD / Asian Silvers
These are films put out by eastern bootleggers, and these are usually bought by some groups to put out as their own. Silvers are very cheap and easily available in a lot of countries, and its easy to put out a release, which is why there are so many in the scene at the moment, mainly from smaller groups who don't last more than a few releases. PDVDs are the same thing pressed onto a DVD. They have removable ubtitles, and the quality is usually better than the silvers. These are ripped like a normal DVD, but usually released as VCD.


Formats

VCD
VCD is an mpeg1 based format, with a constant bitrate of 1150kbit at a resolution of 352x240 (NTCS). VCDs are generally used for lower quality transfers (CAM/TS/TC/Screener(VHS)/TVrip(analogue) in order to make smaller file sizes, and fit as much on a single disc as possible. Both VCDs and SVCDs are timed in minutes, rather than MB, so when looking at an mpeg, it may appear larger than the disc capacity, and in reality u can fit 74min on a CDR74.


SVCD
SVCD is an mpeg2 based (same as DVD) which allows variable bit-rates of up to 2500kbits at a resolution of 480x480 (NTSC) which is then decompressed into a 4:3 aspect ratio when played back. Due to the variable bit-rate, the length you can fit on a single CDR is not fixed, but generally between 35-60 Mins are the most common. To get a better SVCD encode using variable bit-rates, it is important to use multiple "passes". this takes a lot longer, but the results are far clearer.


XVCD/XSVCD
These are basically VCD/SVCD that don't obey the "rules". They are both capable of much higher resolutions and bit-rates, but it all depends on the player to whether the disc can be played. X(S)VCD are total non-standards, and are usually for home-ripping by people who don't intend to release them.


KVCD Thanks for lardo4life for the info
KVCD is a modification to the standard MPEG-1 and MPEG-2 GOP structure and Quantization Matrix. It enables you to create over 120 minutes of near DVD quality video, depending on your material, on a single 80 minute CD-R/CD-RW. We have published these specifications as KVCDx3, our official resolution, which produce 528x480 (NTSC) and 528x576 (PAL) MPEG-1 variable bit rate video, from 64Kbps to 3,000Kbps. Using a resolution of 352x240 (NTSC) or 352x288 (PAL), it's possible to encode video up to ~360 minutes of near VCD quality on a single 80 minute CD-R. The mpeg files created will play back in most modern standalone DVD players. You must burn the KVCD MPEG files as non-standard VCD or non-standard SVCD (depends on your player) with Nero or VCDEasy.


DivX / XviD
DivX is a format designed for multimedia platforms. It uses two codecs, one low motion, one high motion. most older films were encoded in low motion only, and they have problems with high motion too. A method known as SBC (Smart Bit-rate Control) was developed which switches codecs at the encoding stage, making a much better print. The format is Ana orphic and the bit-rate/resolution are interchangeable. Due to the higher processing power required, and the different codecs for playback, its unlikely we'll see a DVD player capable of play DivX for quite a while, if at all. There have been players in development which are supposedly capable, but nothing has ever arisen. The majority of PROPER DivX rips (not Re-Encs) are taken from DVDs, and generally up to 2hours in good quality is possible per disc. Various codecs exist, most popular being the original Divx3.11a and the new XviD codecs.


CVD
CVD is a combination of VCD and SVCD formats, and is generally supported by a majority of DVD players. It supports MPEG2 bit-rates of SVCD, but uses a resolution of 352x480(ntsc) as the horizontal resolution is generally less important. Currently no groups release in CVD.


DVD-R
Is the recordable DVD solution that seems to be the most popular (out of DVD-RAM, DVD-R and DVD+R). it holds 4.7gb of data per side, and double sided discs are available, so discs can hold nearly 10gb in some circumstances. SVCD mpeg2 images must be converted before they can be burnt to DVD-R and played successfully. DVD>DVDR copies are possible, but sometimes extras/languages have to be removed to stick within the available 4.7gb.


MiniDVD
MiniDVD/cDVD is the same format as DVD but on a standard CDR/CDRW. Because of the high resolution/bit-rates, its only possible to fit about 18-21 mins of footage per disc, and the format is only compatible with a few players.


Misc Info

Regional Coding
This was designed to stop people buying American DVDs and watching them earlier in other countries, or for older films where world distribution is handled by different companies. A lot of players can either be hacked with a chip, or via a remote to disable this.


RCE
RCE (Regional Coding Enhancement) was designed to overcome "Multiregion" players, but it had a lot of faults and was overcome. Very few titles are RCE encoded now, and it was very unpopular.


Macrovision
Macrovision is the copy protection employed on most commercial DVDs. Its a system that will display lines and darken the images of copies that are made by sending the VHS signals it can't understand. Certain DVD players (for example the Dansai 852 from Tescos) have a secret menu where you can disable the macrovision, or a "video stabaliser" costs about 30UKP from Maplin (www.maplin.co.uk)


NTSC/PAL
NTSC and PAL are the two main standards used across the world. NTSC has a higher frame rate than pal (29fps compared to 25fps) but PAL has an increased resolution, and gives off a generally sharper picture. Playing NTSC discs on PAL systems seems a lot easier than vice-versa, which is good news for the Brits An RGB enabled scart lead will play an NTSC picture in full colour on most modern tv sets, but to record this to a VHS tape, you will need to convert it to PAL50 (not PAL60 as the majority of DVD players do.) This is either achieved by an expensive converter box (in the regions of £200+) an onboard converter (such as the Dansai 852 / certain Daewoos / Samsung 709 ) or using a World Standards VCR which can record in any format.


News Sites
There are generally 2 news sites for film release for p2p and they are:

nforce - VCD Help
Code:
http://www.vcdhelp.com/

Code:
http://www.nforce.nl


About Release Files

RARset
The movies are all supplied in RAR form, whether its v2 (rar>.rxx) or v3 (part01.rar > partxx.rar) form.


BIN/CUE
VCD and SVCD films will extract to give a BIN/CUE. Load the .CUE into notepad and make sure the first line contains only a filename, and no path information. Then load the cue into Nero/CDRWin etc and this will burn the VCD/SVCD correctly. TV rips are released as MPEG. DivX files are just the plain DivX - .AVI


NFO
An NFO file is supplied with each movie to promote the group, and give general iNFOrmation about the release, such as format, source, size, and any notes that may be of use. They are also used to recruit members and acquire hardware for the group.


SFV
Also supplied for each disc is an SFV file. These are mainly used on site level to check each file has been uploaded correctly, but are also handy for people downloading to check they have all the files, and the CRC is correct. A program such as pdSFV or hkSFV is required to use these files.


Usenet Information

Access
To get onto newsgroups, you will need a news server. Most ISPs supply one, but this is usually of poor retention (the amount of time the files are on server for) and poor completition (the amount of files that make it there). For the best service, a
premium news server should be paid for, and these will often have bandwidth restrictions in place.


Software
You will need a newsreader to access the files in the binary newsgroups. There are many different readers, and its usually down to personal opinion which is best. Xnews / Forte Agent / BNR 1 / BNR 2 are amongst the popular choices. Outlook has the
ability to read newsgroups, but its recommended to not use that.


Format
Usenet posts are often the same as those listed on VCDQUALiTY (i.e., untouched group releases) but you have to check the filenames and the description to make sure you get what you think you are getting. Generally releases should come down in .RAR sets. Posts will usually take more than one day to be uploaded, and can be spread out as far as a week.


PAR files
As well as the .rxx files, you will also see files listed as .pxx/.par . These are PARITY files. Parity files are common in usenet posts, as a lot of times, there will be at least one or two damaged files on some servers. A parity file can be used to replace ANY ONE file that is missing from the rar set. The more PAR files you have, the more files you can replace. You will need a program called SMARTPAR for this.


Scene Tags

PROPER
Due to scene rules, whoever releases the first Telesync has won that race (for example). But if the quality of that release is fairly poor, if another group has another telesync (or the same source in higher quality) then the tag PROPER is added to the folder to avoid being duped. PROPER is the most subjective tag in the scene, and a lot of people will generally argue whether the PROPER is better than the original release. A lot of groups release PROPERS just out of desperation due to losing the race. A reason for the PROPER should always be included in the NFO.


SUBBED
In the case of a VCD, if a release is subbed, it usually means it has hard encoded subtitles burnt throughout the movie. These are generally in malaysian/chinese/thai etc, and sometimes there are two different languages, which can take up quite a large amount of the screen. SVCD supports switch able subtitles, so some DVDRips are released with switch able subs. This will be mentioned in the NFO file if included.


UNSUBBED
When a film has had a subbed release in the past, an Unsubbed release may be released


LIMITED
A limited movie means it has had a limited theater run, generally opening in less than 250 theaters, generally smaller films (such as art house films) are released as limited.


INTERNAL
An internal release is done for several reasons. Classic DVD groups do a lot of .INTERNAL. releases, as they wont be dupe'd on it. Also lower quality theater rips are done INTERNAL so not to lower the reputation of the group, or due to the amount of rips done already. An INTERNAL release is available as normal on the groups affiliate sites, but they can't be traded to other sites without request from the site ops. Some INTERNAL releases still trickle down to IRC/Newsgroups, it usually depends on the title and the popularity. Earlier in the year people referred to Centropy going "internal". This meant the group were only releasing the movies to their members and site ops. This is in a different context to the usual definition.


STV
Straight To Video. Was never released in theaters, and therefore a lot of sites do not allow these.


OTHER TAGS

*WS* for widescreen (letterbox)
*FS* for Fullscreen.


RECODE
A recode is a previously released version, usually filtered through TMPGenc to remove subtitles, fix color etc. Whilst they can look better, its not looked upon highly as groups are expected to obtain their own sources.


REPACK
If a group releases a bad rip, they will release a Repack which will fix the problems.


NUKED
A film can be nuked for various reasons. Individual sites will nuke for breaking their rules (such as "No Telesyncs") but if the film has something extremely wrong with it (no soundtrack for 20mins, CD2 is incorrect film/game etc) then a global nuke will occur, and people trading it across sites will lose their credits. Nuked films can still reach other sources such as p2p/usenet, but its a good idea to check why it was nuked first in case. If a group realise there is something wrong, they can request a nuke.


NUKE REASONS :: this is a list of common reasons a film can be nuked for (generally DVDRip)

** BAD A/R ** :: bad aspect ratio, ie people appear too fat/thin
** BAD IVTC ** :: bad inverse telecine. process of converting framerates was incorrect.
** INTERLACED ** :: black lines on movement as the field order is incorrect.


DUPE
Dupe is quite simply, if something exists already, then theres no reason for it to exist again without proper reason.

Tuesday, May 26, 2009

অমুসলিমের সাথে বিবাহ [ইসলামের দৃষ্টিতে]

বিবাহর ক্ষেত্রে অমুসলিমগন দুইভাগে বিভক্ত। আহলে কিতাব এবং আহলে কিতাব নয়। আসমানী কিতাব অনুসারীগন ‘আহলে কিতাব’ হিসেবে গন্য। যেমন ইয়াহুদী ও খ্রিস্টান। কুরআন শরীফে এই দুই সম্প্রদায়কে ‘আহলে কিতাব’ নামে আখ্যায়িত করা হয়েছে।(সূরা আন’আম,৬/১৫৬)
মহান আল্লাহ্‌ মুসলিম পুরুষদেরকে কেবল ‘আহলে কিতাব’ নারী বিবাহ করার অনুমতি প্রদান করেছেন। কুরআন মজীদে ইরশাদ হয়েছেঃ


وَالْمُحْصَنَاتُ مِنَ الَّذِينَ أُوتُواْ الْكِتَابَ مِن قَبْلِكُمْ


এবং তোমাদের পূর্বে যাদেরকে কিতাব দেওয়া হয়েছে তাদের সচ্চরিত্রা নারী তোমাদের জন্য বৈধ করা হল। (সূরা মায়িদা,৫/৫)

কোন মুসলিম নারীর কোন ‘আহলে কিতাব’ পুরুষের সাথে বিবাহ বন্ধনে আবদ্ধ হওয়া নম্পূর্ণ হারাম। মুসলমানদের জন্য আহলে কিতাব নারী বিবাহ করা বৈধ হলেও স্থান-কাল-পাত্রভেদে তা অপছন্দনীয় বলে ফকীহ্‌গন মত প্রকাশ করেছেন।
যারা আহলে কিতাব নয় তারা মুশরিক এবং কাফির তা যে ধর্মেরই অনুসারী হক। এই পর্যায়ে হিন্দু, বৌদ্ধ, জৈন, নাস্তিক, অগ্নিউপাসক সকলেই এক পর্যায়ভুক্ত। কাদিয়ানীরা মুশরিক না হলেও মুসলিম উম্মাহ্‌র ঐকমত্য অনুযায়ী কাফির। তাদের সাথে মুসলিম নারী-পুরুষের বৈবাহিক সম্পর্ক স্থাপন আল্লাহ্‌ তা’আলা চিরতরে, সর্বতোভাবে ও সম্পূর্ণভাবে নিসিদ্ধ করেছেন। কুরআন মজীদে ইরশাদ হয়েছেঃ


وَلاَ تَنكِحُواْ الْمُشْرِكَاتِ حَتَّى يُؤْمِنَّ وَلأَمَةٌ مُّؤْمِنَةٌ خَيْرٌ مِّن
مُّشْرِكَةٍ وَلَوْ أَعْجَبَتْكُمْ وَلاَ تُنكِحُواْ الْمُشِرِكِينَ حَتَّى يُؤْمِنُواْ وَلَعَبْدٌ
مُّؤْمِنٌ خَيْرٌ مِّن مُّشْرِكٍ وَلَوْ أَعْجَبَكُمْ


মুশরিক নারীরা ঈমান না আনা পর্যন্ত তোমরা তাদেরকে বিবাহ করবে না। মুশরিক নারী তোমাদের মুগদ্ধ করলেও নিশ্চয়ই মু’মিন ক্রীতদাসী তার চেয়ে উত্তম। মুশরিক পুরুষরা ঈমান না আনা পর্যন্ত তাদের সাথে তোমরা(তোমাদের নারীদের) বিবাহ দিবে না। মুশরিক পুরুষ তোমাদের মুগ্ধ করলেও, নিশ্চয় মু’মিন ক্রীতদাস তার চেয়ে উত্তম। (সূরা বাকারা,২/২২১)

তথ্যসুত্রঃ
দৈনন্দিন জীবনে ইসলাম(পৃষ্ঠা-৩৯৯)
ইসলামিক ফাউন্ডেশন বাংলাদেশ

ইসলামে মদ পানের শাস্তি

সকল ফিকহ্‌ শাস্ত্রবিদের মতে মদ্যপায়ীকে যথার্থ কর্তৃপক্ষ কর্তৃক শাস্তি প্রদান করা ওয়াজিব। ইমাম আযম আবূ হানীফা (র.) এবং ইমাম মালিক (র.)-এর মতে মদ্যপায়ীর শাস্তি আশি বেত্রাঘাত। সাহাবীগণের যুগে আশি বেত্রাঘাতের উপর ঐকমত্য স্থাপিত হয়।[ক]

শাস্তির শর্ত
নেশাগ্রস্ত ব্যক্তির উপর শরী’আতের -হদ্‌- প্রয়োগের ক্ষেত্রে নিন্মোক্ত শর্তাবলী পাওয়া জরুরীঃ
১. জ্ঞান সম্পন্ন হওয়া। পাগলের উপর হদ্‌ জারী করা যাবে না।
২. বয়ঃপ্রাপ্ত হওয়া। অপ্রাপ্ত বয়স্কের প্রতি শাস্তি প্রয়োগ করা হবে না।
৩. মুসলমান হওয়া। কাফির ব্যক্তির উপর হদ্‌ প্রযোজ্য নয়।
৪. ইচ্ছাপূর্বক সেবনকারী হওয়া। ভুলবশত সেবন করলে বা জোরপুর্বক সেবন করানো হলে তার উপর হদ্‌ প্রযোজ্য হবে না।
৫. মুযতার বা প্রাণ বাঁচানোর তাগিদে মদ পান করলে তার উপর হদ্‌ প্রযোজ্য হবে না।[খ]

ক. তিরমিযী, সূত্রঃ মিশকাত, পৃ.১৬৫
খ. তিরমিযী, সূত্রঃ মিশকাত, পৃ.১৬৪

তথ্যসুত্রঃ
দৈনন্দিন জীবনে ইসলাম (পৃষ্ঠা-৬৩৬)
ইসলামিক ফাউন্ডেশন বাংলাদেশ

বাংলা কোরআন শরীফ

পবিত্র-কোরআন শরীফ-এর বাংলায় অনুবাদ এইখানে দেওয়া হলো। ইহা একটি ফ্রি সফটওয়ার। এইখানে সম্পূর্ন -কোরআন শরীফ-টি তিনটি ভাষায় পড়তে পারবেন — আরবী, বাংলা এবং ইংরেজী –।

Download : -কোরআন শরীফ-
স্বত্যাধিকারঃ www.IslamDharma.net

আরও দুইটা -কোরআন শরীফ- সফটওয়ারের লিংক এখানে দেওয়া হলো-
Download : QuranViewer v1.6, QuranTrans.

ইসরাইলের পরমাণু বোমা ও জাতিসংঘের পর্যবেক্ষকগণ

সম্প্রতি একটি গুরম্নত্বপূর্ণ বিষয় বিশ্ববাসীর দৃষ্টি আকর্ষণ করেছে। বিশ্বের শানিত্মপ্রিয় মানুষ অবাক বিস্ময়ে লড়্গ্য করেছে একটি বিতর্কিত রাষ্ট্র জাতিসংঘের প্রতি কি ধৃষ্টতাপূর্ণ আচরণ করলো। গত ৪ অক্টোবর জাতিসংঘের উদ্যোগে ১৪৫ জাতি পরমাণু সম্মেলনে মধ্যপ্রাচ্যের সকল আরব রাষ্ট্রই মধ্যপ্রাচ্যকে পরমাণুমুক্ত এলাকা হিসেবে গড়ে তোলার ওপর দৃঢ় বক্তব্য উত্থাপন করে। আরব রাষ্ট্রগুলো ও ইরান স্পষ্টভাবে তাদের মতামত প্রকাশ করে বলেছে যে, ইসরাইলের হাতে অজস্র পরমাণু বোমা মজুদ আছে যা মধ্যপ্রাচ্যের সকল আরব রাষ্ট্রের নিরাপত্তার জন্য ভয়াবহ হুমকি। সুতরাং পরমাণুমুক্ত মধ্যপ্রাচ্য গড়ে তুলতে হলে ইসরাইলের পরমাণু প্রকল্প জাতিসংঘের উদ্যোগে আনত্মর্জাতিক সর্ববেড়্গণের আওতায় আনতে হবে। কিন্তু ইসরাইল স্পষ্টভাবে জানিয়ে দেয় যে, তারা নিজ দেশের পরমাণু প্রকল্পে কোন আনত্মর্জাতিক পর্যবেড়্গণ বা তদারকির অনুমতি দেবে না। সম্মেলনে যুক্তরাষ্ট্র ও ইউরোপিয়ান ইউনিয়ন ইসরাইলের এই ধৃষ্টতাপূর্ণ বক্তব্যের কোন প্রতিক্রিয়া ব্যক্ত না করে নীরব থাকে। অর্থাৎ যুক্তরাষ্ট্র ও পশ্চিমা দেশগুলো কার্যত ইসরাইলের বক্তব্যকেই সমর্থন করে। এই সত্য আজ দিবালোকের মতই স্পষ্ট যে, ইসরাইলের হাতে পরমাণু বোমা থাকলে আরব রাষ্ট্রগুলো ও ইরান নিজেদের নিরাপত্তা ও আত্মরড়্গার কারণেই পরমাণু বোমা তৈরি করার উদ্যোগ নিতে পারে। এক অর্থে ইসরাইলই মধ্যপ্রাচ্যে পরমাণু অস্ত্র বিসত্মারের উস্কানি দিচ্ছে বলে মনে হওয়াটাই স্বাভাবিক। যার ফলে মধ্যপ্রাচ্যে বিভিন্ন রাষ্ট্রের মধ্যে পরমাণু অস্ত্র নির্মাণের অসুস্থ প্রতিযোগিতা শুরম্ন হয়ে যেতে পারে। এবং এতে শুধুমাত্র মধ্যপ্রাচ্যেই নয় বিশ্বশানিত্মও ভয়ংকরভাবে বিঘ্নিত হতে পারে।

অন্যদিকে মহাশক্তিধর দেশগুলো ইরান ও কয়েকটি উন্নয়নশীল দেশের প্রতি পরমাণু অস্ত্রের নির্মাণকারী হিসেবে দোষারোপ করছে। কিন্তু পরাশক্তিবর্গ ইসরাইলের পরমাণু প্রকল্পের আনত্মর্জাতিক পর্যবেড়্গণের কোন রকম উদ্যোগের ন্যূনতম বাক্যও উচ্চারণ করে না। এদিকে তৃতীয় বিশ্বের উন্নয়নশীল দেশগুলো যদি পরমাণুশক্তিকে শানিত্মপূর্ণভাবে জ্বালানি ও বিদ্যুৎ উৎপাদনের কাজে ব্যবহার করে অথবা কৃষি, শিল্প ও প্রযুক্তি উন্নয়নের প্রচেষ্টা করে সে ড়্গেত্রে যুক্তরাষ্ট্র ও ইউরোপের বৃহৎশক্তিগুলো ওইসব উন্নয়নশীল দেশগুলোর প্রতি সন্দেহের দৃষ্টি নিড়্গেপ করে। এমনকি জাতিসংঘ ও আইএইএ’র দ্বারা আণবিক চুলিস্ন প্রকল্প পর্যবেড়্গণ ও পরিদর্শনের হুমকি প্রদর্শন করে এবং কোন কোন ড়্গেত্রে তা’ বাসত্মবায়িত করে। কোন কোন দেশের প্রতি অবরোধ আরোপও করা হয়ে থাকে। কিন্তু ইসরাইলের ওই সব বৃহৎশক্তি নীরব নিশ্চুপ।

সুতরাং পারমাণবিক অস্ত্রের অধিকারী মহাশক্তিধরদের দ্বি-মুখি একপেশে সিদ্ধানত্মই মধ্যপ্রাচ্যে পরমাণু অস্ত্র নির্মাণ প্রতিযোগিতার প্রধান ড়্গেত্র হলেও আশ্চর্য হওয়ার কিছু নেই।

প্রশ্ন হলো সত্যিই কি ইসরাইলের হাতে পারমাণবিক বোমা আছে? তবে বিভিন্ন নির্ভরযোগ্য তথ্য থেকে জানা গেছে ইসরাইলের হাতে পরমাণু বোমা আছে। কেন না যে সব দেশ পরমাণু অস্ত্র বিসত্মার রোধ বা NPT (Nuclear Non Proliferation Treaty) চুক্তি স্বাড়্গর করেনি, তারা হলো ভারত, পাকিসত্মান, উত্তর কোরিয়া, কিউবা ও ইসরাইল। ভারত, পাকিসত্মান ও উত্তর কোরিয়া পরীড়্গামূলকভাবে পরমাণু বোমা বিস্ফোরণের মাধ্যমে নিজেরা পরমাণুশক্তি হিসেবে আত্মপ্রকাশ করেছে। এর মধ্যে কোন লুকোচুরি নেই। কিউবাকে কোন দেশ বা বৃহৎ শক্তি পরমাণু শক্তি হিসেবে ন্যূনতম সন্দেহের শব্দ বা বাক্যও উচ্চারণ করে না। একমাত্র বিতর্কিত রাষ্ট্র ইসরাইল যার বিরম্নদ্ধে বহুদিন থেকে সন্দেহ করা হচ্ছে, তার হাতে পরমাণু বোমা আছে। যদি ইসরাইলের হাতে পরমাণু বোমা নাই থাকবে তা’হলে সে এনটিপিতে স্বাড়্গর করলো না কেন? তার আছে ৬৫-১১২টি ওয়ার হেড এবং ইসরাইলের ড়্গেপণাস্ত্রের পালস্না ৯৩০ মাইল (১৫০০ কিঃমিঃ)। বিশ্বের পরমাণু বিশেষজ্ঞদের অভিমত, ইসরাইলের কাছে মজুদ আছে ৬০ থেকে ৪০০টি পরমাণু বোমা। অধিকাংশ পরমাণু প্রকৌশলী মরদেচাই ভানুনু এক নির্ভুল হিসাব-নিকাশের ভিত্তিতে গণমাধ্যমের কাছে প্রামাণ্য তথ্য ফাঁস করে বলেছিলেন, ইসরাইলের গোপন পরমাণু অস্ত্রভান্ডারে পরমাণু বোমা মজুদ আছে ১০০ থেকে ২০০টি। ইসরাইলের এই গোপন তথ্য প্রকাশের কারণে মরদেচাই জানুনু ১৮ বছর কারাদণ্ড ভোগ করে ২০০৪ সালে ইসরাইলের কারাগার থেকে মুক্ত হন।

এদিকে সবচেয়ে চমক লাগানো বক্তব্য দিয়েছেন নোবেল শানিত্ম পুরস্কার বিজয়ী মার্কিন যুক্তরাষ্ট্রের সাবেক প্রেসিডেন্ট জিমি কার্টার। তিনি বৃটেনের ওয়েলসে অনুষ্ঠিত সাহিত্য সম্মেলনে যোগদান করেন এবং এ বছরের ২৫ মে রবিবার এক পর্যায়ে সাংবাদিক সম্মেলনে তিনি বলেন, ইসরাইলের হাতে ১৫০টি অথবা তার চেয়েও বেশীসংখ্যক পারমাণবিক বোমা মজুদ আছে। জিমি কার্টার দৃঢ়ভাবে বলেছেন, ইসরাইল মধ্যপ্রাচ্যের একমাত্র পরমাণু শক্তিধর দেশ।

তাছাড়াও ইসরাইলের হাতে যদি পরমাণু বোমা নাই থাকে তা’হলে সে তার পরমাণু প্রকল্পগুলো জাতিসংঘের তত্ত্বাবধানে আনত্মর্জাতিক পর্যবেড়্গণের অনুমতি দিচ্ছে না কেন? যদিও ইসরাইল অন্যান্য পরমাণুশক্তিধর দেশের মতো পরীড়্গামূলকভাবে কোন পারমাণবিক বোমার বিস্ফোরণ ঘটায়নি, কিন্তু ইসরাইল সর্বাত্মক পরমাণু অস্ত্র পরীড়্গা রোধ চুক্তি বা সিটিবিটি (Comprehensive Test Ban Treaty)র দুর্বলতর বৈশিষ্ট্যের পথ ধরে পরীড়্গা চালিয়ে নিতে পারে। যেমন, এই চুক্তি ধারায় কম্পিউটার সিমুলেশনের মাধ্যমে পরমাণু অস্ত্রের নিষিদ্ধ করেনি। এর ফলে পারমাণবিক শক্তিধর দেশগুলো কম্পিউটারের মাধ্যমেই তাদের অস্ত্রের গুণগতমান পরীড়্গা করে নিতে পারে। সুতরাং আধুনিক তথ্যপ্রযুক্তি প্রয়োগ করে ইসরাইল গোপনে তার পরমাণু অস্ত্রের পরীড়্গা করতে পারে।

সুতরাং ইসরাইল গোপন পরমাণু অস্ত্র ও আধুনিক অস্ত্র নির্মাণের ডকুমেন্টস্‌ গুপ্তচরদের মাধ্যমে সংগ্রহ করে থাকে এটা প্রমাণিত সত্য। সামগ্রিক অবস্থা পর্যালোচনা করে নিশ্চিতভাবেই ধরে নেয়া যায় ইসরাইলের পরমাণু প্রকল্পের গোপন স্থানে মজুদ আছে অজস্র পরমাণু অস্ত্র। আর উপসাগরীয় এলাকা ও মধ্যপ্রাচ্যে উত্তেজনা প্রশমিত করতে হলে এবং শানিত্ম প্রক্রিয়া এগিয়ে নিতে হলে অবশ্যই জাতিসংঘ, আইএইএ ও অন্যান্য সংস্থাকে নিরপেড়্গভাবে ইসরাইলের পরমাণু প্রকল্প পর্যবেড়্গণ ও তদারকি করে দেখতে হবে ইসরাইলের হাতে পরমাণু বোমা, জীবাণু ও রাসায়নিক অস্ত্র আছে কিনা। বিশ্বশানিত্মই যদি সকলের কাম্য হয় তাহলে এর বিকল্প আর কি হতে পারে?

নজমুল হক নান্নু
[লেখক- আইনজীবী ও কলামিস্ট]

ত্তথ্যসূত্রঃ দৈনিক ইত্তেফাক [অক্টোবর ১৬, ২০০৮]