Make Your URL Smart (Part -1)

When we have started any project with any framework then its look odd to see the index.php at URL all time.
So its better to remove the index.php from URL and make URL smart.
I am showing the process to remove index.php for Linux base OS system and for KOHANA frmawork. The procedure for other framework are also same. So you can remove index.php for other framework in same way.

There are FOUR steps to remove index.php from URL.
1. Edit your bootstrap file [bootstrap.php]

  • Change the base URL to located the actual directory to your file system
  • Make its empty string to index_file

Its looks ilke the bellow:

	'base_url'   => '/restapi/',  // Your base Url
        'index_file' => '',

2. Then Edit the .htaccess file


3. Run command in shell to enable the write.

	sudo a2enmod  rewrite
	sudo nano /etc/apache2/sites-enabled/000-default

Edit the 000-default file and save

		Allowoverride all

4. Then restart your server

sudo /etc/init.d/apache2 restart

We have done. Now enjoy your smart URL.
In my next post on this category i will try to cover the routing process. Enjoy!!!!


Router Configuration in CLI mood

I take course in CCNA provide by RUET. This course have four semister. I am now in first semister. In my lab i have learned configure the router in the CLI mood. So i want to share it with you…..


Now there is some code:

Router#configure terminal 

//now we are going to put the ip address of the firsteathernet0/0


Router(config)#interface fa
Router(config)#interface fastEthernet0/0
Router(config-if)#ip add
Router(config-if)#ip address

//ip address and subnet mask that you want to configure

//now we are going to put the ip address of the serial port0/0:

Router(config)#interface serial2/0
Router(config-if)#ip add
Router(config-if)#ip address

##in the same way we can put the value of firsteathernet0/0, serial port 0/0 of other router conected to it…….

//now we are going to keep the router passward protecteed:

//To change hostname
Router(config)#hostname CCNA
CCNA(config)#line co
CCNA(config)#line console 0
CCNA(config-line)#password cisco

// now the enable password:

Router(config)#hostname CCNA
CCNA(config)#enable password cisco

// now the enable Telnet:

Router(config)#line vty 0 4

Router(config)#password class


//Now we can configure Router from the host by enable telnet.