Dear all
I removed # in angularjs application working fine. But when i am integrating codeigniter it is notworking. I want to remove index.php in codeigniter and remove # in angularjs also. Please guide me.
What I have tried:
Angular js Htaccess file :
------------------
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^(/index\.php|/img|/js|/css|/robots\.txt|/favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule index.html [L]
Codeigniter Htaccess File :
------------------------
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
In codeigniter view : <base href='/'></base>
Angular App.js :
--------------
App.config(['$routeProvider','$locationProvider',
function($routeProvider, $locationProvider) {
$routeProvider.
when('/', {
templateUrl: 'views/home.html',
controller: 'HomeController'
}).
when('/menus', {
templateUrl: 'views/login.html',
controller: 'LoginController'
})
if(window.history && window.history.pushState){
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
}
}])
---
Thanks & Regards,
Siva.