Revert "Revert "Added Component.ajaxUrl. It doesn't come with index.php. Requiring resource/language/views now uses ajaxUrl.""

This reverts commit ea61b051b80d388895704ba0a8973cc902587508.
Use basePath instead of rootPath for ajaxUrl.