simply i used following .htaccess code
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
difference of below code and codeigniter documentation code is "?" of third row. i highlighted it.
Tuesday, August 30, 2011
How to setup virtual host in ubuntu
Step 1: setup a virtual domain
open /etc/hosts and add a virtual domain with a specific local IP. In this file it contains ip and domain name separated by a space. You can also add the port using a colon with the IP. Lets assume that our virtual domain name is “domain.local” – and It will listen to the ip “127.0.0.1″
so we will add the following line to our /etc/hosts file
127.0.0.1 domain.local
now whenever you point to http://domain.local – your browser will actually open http://127.0.0.1
Step 2: configure virtual host with apache
here we will configure our newly added virtual domain against apache as a virtual host, and did I forget to say, with mod_rewrite enabled 
goto /etc/apache2/sites-available and create a file named “domain.local” – I recommend to keep it the same name as your virtual domain.
sudo gedit /etc/apache2/sites-available/domain.local
write the following contents inside. but please note to create the appropriate directory before linking your virtual host with that, for example we’ve create a folder named “/var/www/domain” and linked that directory as my document root in the following configuration file.
<VirtualHost *:80>
ServerName domain.local
DocumentRoot " /var/www/domain"
DirectoryIndex index.html index.php
<Directory " /var/www/domain">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
now create a symbolic link of this file to /etc/apache2/sites-enabled directory as “domain.local”
sudo ln -s /etc/apache2/sites-available/domain.local /etc/apache2/sites-enabled/domain.local
Step 3: restart apache (or reload)
simple, either one of the followings
simple, either one of the followings
sudo /etc/init.d/apache2 restart
or
sudo /etc/init.d/apache2 reload
and you are done! now you can point your browser to http://domain.local
Wednesday, March 30, 2011
How to Install Firefox 4 in Ubuntu Linux
Earlier today, we reported that Firefox 4 has just been released. Why do you need instructions to install the newest Firefox in Ubuntu? If you go into your Ubuntu Software Center, you’ll see that you more than likely have Firefox 3.6 installed, and it’s “up to date”. Naturally, they don’t add programs to the Software Center as soon as they are released. That would be foolish if there was something wrong with the new version. I don’t blame them for waiting at least a few days for the adventure seekers to provide some feedback.
There are three ways that I know of to add the newest Firefox to Ubuntu.
Method 1: Download Bzipped Package
You can go to the Firefox download page, download the TAR.BZ2 package and manually install it. The advantage of that method is that you won’t lose the current version 3.6 of Firefox. However, you’ll have to unpack the BZ2 file to a folder somewhere, locate the “firefox” executable file, then double click to launch it. If you’d like to, you can also create your own launcher link on the desktop or add it to a panel.
Method 2: Command Line Install
You can add the Firefox “Stable” repository and install the latest version from the command line in a terminal window . That’s actually the easiest method for most linux users. Here are the three simple commands you need to enter into the terminal.
sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update
sudo apt-get upgrade
Method 3: Software Center Install
Open your “Ubuntu Software Center” and click “Edit” > “Software Sources” then click the ‘Other Software’ tab . Add the PPA as shown below. When you exit the “Software Sources” applet, your Software Center will reload the repositories and it may even automatically find the updated Firefox for you.
ppa:mozillateam/firefox-stable
Sunday, March 27, 2011
Ubuntu Linux Configure DNS Name Server IP Address ( DNS Client )
Type the following command, enter:
sudo gedit /etc/resolv.conf
Append your ISP name server or free fast dns nameservers IP address as follows:
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 202.51.5.52
or
Use Google DNS
8.8.8.8
8.8.4.4
sudo gedit /etc/resolv.conf
Append your ISP name server or free fast dns nameservers IP address as follows:
nameserver 208.67.222.222
nameserver 208.67.220.220
nameserver 202.51.5.52
or
Use Google DNS
8.8.8.8
8.8.4.4
Wednesday, March 23, 2011
.htaccess & .htpasswd Files not Working in ubuntu
My solution to solve this is change /etc/apache2/sites-available/default
sudo vi /etc/apache2/sites-available/default
or
sudo nano ....
depending on your preference
You see something like:
Code:
<directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
Change this to:
Code:
<directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
and restart apache (sudo /etc/init.d/apache2 force-reload) and you see the .htaccess file is read and you are required to enter a username/password
sudo vi /etc/apache2/sites-available/default
or
sudo nano ....
depending on your preference
You see something like:
Code:
<directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
Change this to:
Code:
<directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
and restart apache (sudo /etc/init.d/apache2 force-reload) and you see the .htaccess file is read and you are required to enter a username/password
Monday, February 28, 2011
Places menu starts Rhythmbox 0.11.6, doesn't open folder
Simple workaround
Right click -> Open with -> custom command -> nautilus
repeat for all folders
now should open folders from Places in Nautilus
Right click -> Open with -> custom command -> nautilus
repeat for all folders
now should open folders from Places in Nautilus
Monday, February 21, 2011
How to install flash debugger
උබුන්ටු වලදි firefox වලට flashfirebug install කරාට පස්සෙ එක වැඩ කරන්න flash debugger එක ඉල්ලනවා. flash debugger eka install කර ගන්නෙ මෙහෙමයි.
Step by step:
Step by step:
- uninstall any kind of flash plug you have at the moment, make sure it's gone. (this was my problem, probably had the real 64 bit plug installed and there were multiple libflashplayer.so spread all over the place. Make sure you clean out any flash plugin related files from your system)
search for installed flashplugin packages:
you will get a list of packages with flash in the package name, remove them from your system.(flashplugin-nonfree, flashplugin-installer) using the command: sudo apt-get purge [PACKAGE NAME], e.g. sudo apt-get purge flashplugin-nonfreeCode:aptitude search flash p flashblock - mozilla extension that replaces flash elements with a button i A flashplugin-installer - Adobe Flash Player plugin installer i flashplugin-nonfree - Adobe Flash Player plugin installer (transitional package) p flashrom - Universal BIOS/ROM/flash programming utility p flashybrid - automates use of a flash disk as the root filesystem p libroxen-flash2 - Flash2 module for the Roxen Challenger web server p m16c-flash - Flash programmer for Renesas M16C and R8C microcontrollers p vrflash - tool to flash kernels and romdisks to Agenda VR
I always do sudo apt-get autoremove after purge, to get rid of remaining junk, not sure if it's important, but it feels good
- install the flash plugin using the command: sudo apt-get install flashplugin-nonfree
- download the debug player from Adobe: http://download.macromedia.com/pub/f...nux_dev.tar.gz
if they moved the file google for: flash debug player linux
- replace the installed shared object file /usr/lib/flashplugin-installer/libflashplayer.so with the one you downloaded.
Subscribe to:
Posts (Atom)