Apache2.4 Using Alias with mod_rewrite return error 404 not found

Problem:
When i configure Alias in apache,
Alias /testing/ “/var/www/test_folder/”

Then in my ‘test_folder’, i’ve .htaccess file,
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

Then when i run http://mydomain.com/testing,
it will return error 404 Not found

Solution:
The solution below at least is working with my environment:

Alias /testing/ “/var/www/testing/”

<Directory “/var/www/testing/”>

RewriteEngine On
RewriteBase /testing

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
AllowOverride None

</Directory>

So the trick here is by adding the,
RewriteBase /testing
AllowOverride None – set None to NOT use the htaccess file

That’s all, ok Bye šŸ˜‰

Advertisements

Debug PHP Application with XDebug & KCacheGrind on Ubuntu 12.04

Install Xdebug, KCacheGrind on Ubuntu 12.04

Install PHP-Xdebug

sudo apt-get install php5-xdebug


Open php.ini, configure some line:
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = /tmp
xdebug.profiler_enable_trigger=On

 

Restart your apache

Check your phpinfo, and should contain xdebug information.

 

Install KCacheGrind

sudo apt-get install kcachegrind

 

AppendĀ XDEBUG_PROFILE=1 Ā ( in the GET/POST request to your script )
Example, run your app at browser:

http://localhost/myapp/index.php?r=my/dashboard&XDEBUG_PROFILE=1

 

Then open KCacheGrind, and open your file in /tmp folder:
Example:Ā cachegrind.out.11445

Resources:
http://www.xdebug.org/
https://kcachegrind.github.io/html/Download.html

Analysis of mobile development approaches

Link: http://www.techrepublic.com/blog/programming-and-development/analysis-of-mobile-development-approaches/4224?tag=nl.e055

Which mobile development approach fits your needs? If you donā€™t know, read this overview about the possibilities. Also find out which approach Justin James thinks is mobile developersā€™ best bet for long-term success.

Mobile Web applications

Mobile Web applications are at the opposite end of the spectrum. With mobile Web applications, you can use your existing Web development knowledge, and learn the techniques to make it work well on mobile devices. Even better, you can reuse your existing Web applications if you have them already, and you can reach 100% of the smartphone market with a single codebase.

Cross-platform development tools

There are a number of cross-platform development tools designed to help you bridge the gap (Appcelerator is one example); these tools let you develop for their model, and then they create native applications for you. This can be a great approach, although you may need to learn an entirely new set of skills to work with the tool, depending on which one you pick. These tools can also do a great job at making your app look and feel right on each platform it supports, and they will provide access to the lowest-common-denominator of native functionality.

More details at:
Link: http://www.techrepublic.com/blog/programming-and-development/analysis-of-mobile-development-approaches/4224?tag=nl.e055