Monday, December 28, 2009
What is the difference between AIM or SIM in Authorize.Net
Thursday, November 12, 2009
Tuesday, October 20, 2009
Turn dynamic URLs into search engine friendly static URLs
------------------
http://www.scriptscart.com/shop.php?cmd=product&category=vehicles&product=bus
The rewritten URL
--------------------
http://www.scriptscart.com/product/vehicles/bus.html
Add the following lines to .htaccess:
RewriteEngine OnRewriteRule ^([^/]*)/([^/]*)/([^/]*)\.html$ /shop.php?cmd=$1&category=$2&product=$3 [L]
Please follow the instructions below to do it.
- First you need to check if the file .htaccess exists in the root of your website.
- If the file .htaccess exists, download it from your site, add the lines below to the end of the file, and upload the modified file back to your site. Please make a copy of the original file .htaccess. So if anything goes wrong, you may restore the original file.
- If the file .htaccess does not exist, create a new file .htaccess and add the lines below to it. Then upload it to the root of your website. You may delete it if anything goes wrong.
Thursday, August 6, 2009
Payment gateways test account
You can use any of the following test credit card numbers. The expiration date must be set to the present date or later: |
370000000000002 American Express Test Card |
Wednesday, July 1, 2009
Monday, June 15, 2009
How to run a crontab entry as "nobody"
Assuming you are the root user on a Linux computer, here's a quick example of how to run a program on a Linux system through a crontab entry, with the program being executed as the user nobody.
Just put this entry in a crontab file (by issuing the "crontab -e
" command, for example), and the program named myProgram.sh
will be run at 1:30 a.m. using the Bourne shell, and will be run as the user nobody
.
30 1 * * * su -c '/path/to/program/myProgram.sh' -s /bin/sh nobody
testing is always recommended, but this has worked for me.
How to create aliases (linux/unix)
Creating aliases is very easy. You can either enter them at the command line as you're working, or more likely, you'll put them in one of your startup files, like your .bashrc
file, so they will be available every time you log in.
I created the ll
alias by entering the following command into my .bashrc
file:
alias ll="ls -al"
/etc/bashrc
Monday, June 1, 2009
Restore a Mysql database from the server backup
Thursday, March 26, 2009
.htaccess 301 redirection
RewriteEngine On RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Alternate method is
ServerName www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /home/username/public_html
ServerName example.com
RedirectMatch permanent ^/(.*) http://www.example.com/$1
For more details refer http://www.seobook.com/archives/001714.shtml
Wednesday, March 25, 2009
To increase memory limit using .htaccess
Put a .htaccess file with the following code in the particular directory
php_value memory_limit 128M
To get the cpanel username
First login to the server as 'root' then
grep domainname.com /etc/userdomains
Friday, March 20, 2009
To get the file names only using grep
grep findword . -ir | cut -d: -f1
To search in the .php files only
find . -name "*.php" | grep findword -ir | cut -d: -f1
Tuesday, January 27, 2009
How to add a user in the freeBSD using a shell script?
touch useradd.txt
echo "$linux_login::::::::bash:" > useradd.txt
/usr/sbin/adduser -f useradd.txt -k $skeldir $linux_login -w no
sample useradd.txt file
-----------------------
test::::::::bash: