I created a simple app with Backbone and Marionette. Its working properly, no errors or something like that. But when I saw the URL, it has a hash in front of URL, here's my link
programming/index.html#chart
programming/index.html#tutorial/3
programming/index.html#tutorial/6
I want to make it cleaner and more readable, I want remove the hastag and replace by /
so the URL looks like this
programming/index.html/chart
programming/index.html/tutorial/3
programming/index.html/tutorial/6
and can access this too
programming/chart
programming/tutorial/3
programming/tutorial/6
I tried much of answer of this question
Routing in Backbone.js / Marionette.js - no hashtags, route list and sub-routers
BackboneJS - Router issues - how to get clean URL's
I tried to make pushState to true, like this
programming.on('start',function(){
if(Backbone.history){
Backbone.history.start({
pushState : true
});
if(this.getCurentRoute() === ""){
programming.trigger("program:list")
}
}
})
I tried to make a .htaccess file
<IfModule mod_rewrite.c>
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /#$1 [R,L,NE]
</IfModule>
But all of them not working for me :( please everybody help me out.