Archive for April, 2010

Redirect request to other domain

I was trying to redirect all of my one wordpress blog setup which is setup on sub directory to the dedicated wordpress domain. To do so I have added following in directory based blog’s htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} ^example1.com$ [NC] RewriteCond %{REQUEST_URI} ^/wp-blog/(.*) [NC] RewriteRule ^(.*)$ http://example2-blog-site.com/%1 RewriteCond %{HTTP_HOST} ^www.example1.com$ [NC] RewriteCond %{REQUEST_URI} [...]

Continue reading »

મારિ મા

કેમ કરિને ભુલાય તારો પ્રેમ મારિ મા! આજે મને પન મને દેખાય છે અશ્રુઓ ના બિન્દુ તારિ આખો ના કિનારે જયારે કોઇ મને દુખ દે છે. કેમ કરિને ભુલાય તારિ હુમ્ફ મારિ મા! આજે પન મને યાદ આવે છે તારિ સાડિ નો પાલવ મારી ગમ્ગિન મા. કેમ કરિને ભુલાય તારો સહારો મારિ મા! આજે મને [...]

Continue reading »

Types of fulltext search functions

I do remember my old days when I am new to MySQL and Web industry. At that point of time whenever I have to implement search functionality I was used to implement it via LIKE keyword as below: SELECT * FROM tbl_name WHERE col_name LIKE “%search_term%” At that time I am not aware of full-text [...]

Continue reading »

session lost between http and https

Today I came across strange problem. Let me explain you exact problem and solution for that. Problem: I have e-commerce site developed. After product added to shopping cart when user trying to checkout I am redirecting user from Shopping cart to Account page (if user already logged in) or Login Page (if user not logged [...]

Continue reading »

Error Levels in PHP

Following error levels constants available into PHP for error_reporting which are configured directly from php.ini, .htaccess or directly from php script using ini_set function: Value Constant Description 1 E_ERROR Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted. 2 E_WARNING [...]

Continue reading »

What is error_reporting & display_error?

There are little misunderstanding regarding two good configuration variables  available in php.ini. error_reporting: This enables you to set error level i.e what are the different types of error you would like to log/show. All possible values for this setting are shown here display_error: This enables you to show/hide errors on user browser if any error [...]

Continue reading »

Follow

Get every new post delivered to your Inbox.