Hello dear blog surfers, wanna tell you something about me. You recall the things that happened each month/day/time a year ago. Thats what everybody does. I was so broken last Ramadan that I fell seriously ill. (more…)

Hello dear blog surfers, wanna tell you something about me. You recall the things that happened each month/day/time a year ago. Thats what everybody does. I was so broken last Ramadan that I fell seriously ill. (more…)
Note: Based on its popularity, updated on 6th june 2011 to clean up code for easy copy paste.
OK readers, here is a simple method to achieve clean urls with your PHP application developed in CodeIgniter.
Please note that this method is applicable only to applications developed in CodeIgniter. Much of the content has been taken from CodeIgniter wiki but rewritten in my own way.
This article explains how to take away “index.php” from your CI application URLs. However, it does NOT remove the need for Index.php, which is the CI front controller i.e. even though Index.php will not appear in the URL, it still needs to be present at the top level of your site (above the /system/ directory). To quote the User Guide,
You can easily remove this file by using a .htaccess file with some simple rules.
You need to perform the following steps to get this working:
Create a new file named .htaccess and put it in your web directory
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
Notes for Windows users:
To create this file you must open Command Prompt and type:
copy con .htaccess [Enter] [Press CTRL + Z]
A blank .htaccess file will be created. Now you can edit it using Notepad or your favorite text editor and copy the script above.
Note: Most Windows editors will assume that you are attempting to save an .htaccess file as a file with an extension and no filename. The Crimson Editor can be used to create and save .htaccess files and other files that have no filename.
Note: If your site is placed in subfolder specify the path in the “RewriteBase /subfolder/” line.
Open your
system/application/config/config.php
and find the line that assigns $config['index_page'] a value, usually:
$config['index_page'] = "index.php";
and change it to:
$config['index_page'] = '';
Save the file.
This means that the apache must be configured to load the mod_rewrite module (or it might have it compiled-in). For module inclusion, usually you have to look for a line like this in httpd.conf or a file loaded by it (hint: use some quick file search utility to grep files with lines containing ‘rewrite’ string):
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
If you’re running Apache2 type
a2enmod
in the console and when prompted
rewrite
to enable mod_rewrite.
On a Windows machine this line might look this way:
LoadModule rewrite_module modules/mod_rewrite.so
If it is commented out (# in front), make sure to uncomment it and save the file. Checking if the corresponding module exists may be a good idea as well (but it usually does).
This means that apache is explicitly configured to allow .htaccess files to override those directives that you use in your .htaccess file from step 1. above.
It seems to be sufficient if you add these two lines to your section where you configure the document root for your CI application:
#... Options FollowSymLinks AllowOverride FileInfo #...
There might be other Options listed, just make sure you have FollowSymLinks as well.
Should you get a 500 Internal Server Error, try the following syntax:
Options Indexes Includes FollowSymLinks MultiViews AllowOverride AuthConfig FileInfo Order allow,deny Allow from all
Works? Congratulations!
Doesn’t work? Ehrrr… well, do not give up; equip yourself with patience, double check all steps above and if it still does not work, post on the forum giving all details of your setup.
<IfModule mod_rewrite.c> ... </IfModule>
Do what is inside only if Apache has the mod_rewrite feature (by in place compilation, or loaded module).
RewriteEngine On
Activate the URL rewriting engine, if not already done (in main Apache configuration file.
RewriteBase /
Define the part of the URL that won’t change nor be used for rewriting. In fact, this part will be removed before processing, and prepended after processing. This’s a good way to use subfolder-independent rewrite rules. For example, if your CodeIgniter index.php is placed in a virtual host directory, like /tests/, set RewriteBase to /tests/.
RewriteCond %{REQUEST_FILENAME} !-f
Condition to meet for RewriteRule activation. Here, we test if the requested filename does not exist.
RewriteCond %{REQUEST_FILENAME} !-d
Same as above, but we test for directory existence.
RewriteRule ^(.*)$ index.php/$1 [L]
If RewriteCond conditions are met, this rule will be applied. It inserts index.php before the requested URI. The $1 represents the part of string enclosed by parentheses in left expression. The [L] means that this rule is the last one if rule is applied (thus stopping rewriting).
The Apache mod_rewrite docs say
While URL manipulations in per-server context are really fast and efficient, per-directory rewrites are slow and inefficient. If you have access to your httpd.conf file, you’ll have better performance if you configure the rewrite rules in there.
You can add something like this to your httpd.conf:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
Configuring mod_rewrite and virtual hosting with Apache 2.2
ServerName www.mydomain.com
DocumentRoot /path/to/ci/directory
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Credits: http://codeigniter.com/wiki/mod_rewrite/
The famous youtube video with Views: 43,494,596 so far. Its amazing with no acting of two little children. Its originality makes it great. I am sure you will love it. (more…)
Letting the world know about your blog is one of the trickier aspects of starting a new blog or getting people notice one that you’ve been working on. This is so-called search engine optimization or SEO. Google is the most obvious target for these efforts as it dominates the search market and is the default search engine for popular browsers like Firefox. Moreover of you open up the browser and you have nothing particular in mind, the most probable site you type in address bar is google.com yeah I know it
. Google rules the SEO tech world and everybosy wants to be in google SERPS (Search engine result pages). Working around the rules that keep Google and other search engines relevant is arcane at best and at worst will result in your sites being demoted in relevance or delisted entirely. Yep that happens. I have learnt it from my best and worst SEO experiences. There are many theorists and companies that indulge in this sort of speculation and some are more successful than others at nudging search results in the ways they desire them to.
Well guys (not to mention the girls) , SEO is what can be called the ” The most desirable feature/quality (whatever you name it) of a website. To me there are two points about SEO.
This photo is credited to famous photographer Fayyaz Ahmed.
According to Fayyaz’s notes, he found this subject at the tomb of Abdullah Shah Ghazi in Clifton, Karachi. When he asked for the photo permission, the subject replied:
“Whatever you wish”.
I saw this photo for the first time a few days ago but I keep coming back to it again and again. There is something about this guy’s eyes.
My comments:
I think there is some undefined kinda intensity in his eyes that make this picture so special and eye catching!
– Easy Builder to Create JavaScript Cross Browser Menus!
Sothink DHTML Menu is a comprehensive navigation solution for web site. It creates drop-down menu easily and behaves friendly to search engine. Includes user-friendly interface, keyboard navigation, fresh templates, lots of effects and optimal publishing. Tree-like menu can be switched to drop-down menu. Copy and paste menu items in different menu files. Supports Windows Vista. Free add-ins for Dreamweaver, FrontPage, Expression Web and GoLive.
Version 8.2 supports Keyboard Navigation function, which enables user to control the menu by using the keyboard; adds advanced function to both Menu Item Setting and Separator Setting.
SwisSQL – SQL Server to Oracle Migration Tool helps you migrate MS SQL Server Transact-SQL Procedures, Functions and Triggers to Oracle PL/SQL language. When enterprises migrate from MS SQL Server to Oracle, application migration is one of the tedious tasks and there are no good tools which can ease the process of migrating MS SQL Server Stored Procedures to Oracle PL/SQL. Using SwisSQL – SQL Server to Oracle Migration Tool and through AdventNet’s superior support, enterprises can realize significant time and cost savings during the migration and testing process.
For more information on this tool, go to this page.
Animoto Productions is a bunch of techies and film/tv producers who decided to lock themselves in a room together and nerd out.
Their first release is Animoto, a web application that automatically generates professionally produced videos using their own patent-pending technology and high-end motion design. Each video is a fully customized orchestration of user-selected images and music. Produced on a widescreen format, Animoto videos have the visual energy of a music video and the emotional impact of a movie trailer.
The heart of Animoto is its newly developed Cinematic Artificial Intelligence technology that thinks like an actual director and editor. It analyzes and combines user-selected images and music with the same sophisticated post-production skills & techniques that are used in television and film.
Based in New York City with an office in San Francisco, the founders of Animoto are veterans of the entertainment industry and have produced shows for MTV, Comedy Central, & ABC, studied music in London, and played in indie rock bands in Seattle. They continue to innovate in the field of creative artificial intelligence. They plan to acquire Google next year.
| Country Name | Domain Name Suffix |
| AFGHANISTAN | .af |
| ÅLAND ISLANDS | .ax |
| ALBANIA | .al |
| ALGERIA | .dz |
| AMERICAN SAMOA | .as |
| ANDORRA | .ad |
| ANGOLA | .ao |
Lately people have been asking me how to scrap all your friends, so here we go. I discovered it somewhere as on Orkut Hack. So here we go
Being on Orkut, just paste the following in the address bar (more…)
Fahd Murtaza is the guy behind fahdmurtaza.com: your source for getting your web development projects done. Fahd sepcialises in Open Source Web Development and his favorite is WordPress. This site is a platform to his web development portfolio and blog all on a newly designed responsive website—try viewing it on your mobile.
If after viewing Fahd's portfolio, you think he might be just the guy to hire for your web / application development; check out the web development pricing page, then find out how to hire Fahd with a web development project idea and a brief of requirements.
Fahd Murtaza has put together a number of Web Development Articles that will help you see what he does, how he does it. You will also be able to see the level of work, and passion, that Fahad puts into each and every job. Understanding a little about the process can make the idea of investing good money much more palatable. People have always appreciated my Agile techniques. Its time you