Redirect by .htaccess is easy for a server.
If you want to redirect a link then put the .htaccess file in root folder of the server.
Then put the following of code in .htaccess file.
Redirect 301 old_link.html new_link.html
the above is normal rule. but if you have space in the old link (not _ ) then it makes problem.
then add the following code after RewriteEngine On
RewriteRule ^/?tag/(.*)\ (.*)$ /tag/$1-$2 [L,R=301]
then put the redirect condition suppose:
Redirect 301 '/codebooks/Malawi Geocoded Aid Codebook.pdf' http://aiddata.org/weceem_uploads/_ROOT/File/geocoding/UCDP_AidData_Codebook_Published.pdf
the Malawi Geocoded Aid Codebook.pdf is in single cote and this link has %20 or space
it was : /Malawi%20Geocoded%20Aid%20Codebook.pdf
i have become success by following above rule.
Wednesday, 8 May 2013
Friday, 3 May 2013
how on allow_url_fope in server
Some times you need to on allow_url_fopen in server. then you can try by the following two ways:
1. Create a .htaccess file and keep it to root folder ( sometimes it may need to place it one step back folder of the root) and paste this code there.
php_value allow_url_fopen On
2. Create a php.ini file (for update srver php5.ini) and keep it to root folder( sometimes it may need to place it one step back folder of the root) and paste the following code there
allow_url_fopen = On;
I, personally get effet by using the above solutions.
1. Create a .htaccess file and keep it to root folder ( sometimes it may need to place it one step back folder of the root) and paste this code there.
php_value allow_url_fopen On
2. Create a php.ini file (for update srver php5.ini) and keep it to root folder( sometimes it may need to place it one step back folder of the root) and paste the following code there
allow_url_fopen = On;
I, personally get effet by using the above solutions.
Thursday, 18 April 2013
how write shorthand if else condition in php
If else condition is the first syntax that a programmer learn.
Generally we use like below condition:
if(condition)
{
do some task
}
else
{
do some task.
}
but you can use a short hand way, that will reduce your line of codes.
(condition) ? task1 : task2
ie. if condition is ok the it will do task1 otherwise it will do task2
example:
<?php
$signal = '0';
$signal == '1' ? $message = 'I am right' : $message = 'I am wrong';
echo $message;
?>
Just copy and paste this code to a file and run in server. you will understand it.
Change $signal variable, then it will do second task.
Generally we use like below condition:
if(condition)
{
do some task
}
else
{
do some task.
}
but you can use a short hand way, that will reduce your line of codes.
(condition) ? task1 : task2
ie. if condition is ok the it will do task1 otherwise it will do task2
example:
<?php
$signal = '0';
$signal == '1' ? $message = 'I am right' : $message = 'I am wrong';
echo $message;
?>
Just copy and paste this code to a file and run in server. you will understand it.
Change $signal variable, then it will do second task.
Monday, 15 April 2013
how off magic_quotes in php server
In php server you may need to On or Off different functions. Here has discussed how you can off
magic_quotes_gpc
magic_quotes_runtime
and magic_quotes_sybase
you can off this functions by different ways. At first you can ask server authority to off it by changing this function On or Off.
or
you can write on .htaccess file
or
you can create a php.ini file and upload it to in your server root.
i have tried all of the above ways to Off magic_quotes_gpc , but could not.
Then i got a solution which is to create a php5.ini ( not php.ini ) and write the following codes to the file.
magic_quotes_gpc = Off;
magic_quotes_runtime = Off;
magic_quotes_sybase = Off;
Then i see it is Off now.
It is used for joomla 3 version articles edit for some servers.
magic_quotes_gpc
magic_quotes_runtime
and magic_quotes_sybase
you can off this functions by different ways. At first you can ask server authority to off it by changing this function On or Off.
or
you can write on .htaccess file
or
you can create a php.ini file and upload it to in your server root.
i have tried all of the above ways to Off magic_quotes_gpc , but could not.
Then i got a solution which is to create a php5.ini ( not php.ini ) and write the following codes to the file.
magic_quotes_gpc = Off;
magic_quotes_runtime = Off;
magic_quotes_sybase = Off;
Then i see it is Off now.
It is used for joomla 3 version articles edit for some servers.
Wednesday, 10 April 2013
আমরা বাংলাদেশিরা কিভাবে IT তে কারিয়ার গড়বো
আস-সালামু আলাইকুম,
আমি আজ আপনাদের ইনফর্মেশন টেকনোলজি তে কিভাবে কারিয়ার গড়বেন সেই বেপারে কিছু কথা বলতে চাই।
১। আই টি একটা সম্মানজনক পেশা । আপনাকে এখানে একাগ্রতার সাথে কাজ করতে হবে
আমি আজ আপনাদের ইনফর্মেশন টেকনোলজি তে কিভাবে কারিয়ার গড়বেন সেই বেপারে কিছু কথা বলতে চাই।
১। আই টি একটা সম্মানজনক পেশা । আপনাকে এখানে একাগ্রতার সাথে কাজ করতে হবে
Friday, 5 April 2013
Learn php coding
If you want to make you a php developer you will have to follow the following instructions:
how you will learn coding
Today I will discuss about how you can learn coding.
Each person in web development want to know about better coding system.
And in every profession, all wants to earn by other side works.
Programing can be a better option for side incomes.
Each person in web development want to know about better coding system.
And in every profession, all wants to earn by other side works.
Programing can be a better option for side incomes.
Subscribe to:
Posts (Atom)