emad-elsaid / devtools

A set of simple tools every developer needs, collected in one application.
http://www.emadelsaid.com/devtools
MIT License
15 stars 6 forks source link

Ember should use #! instead of html5 push feature #9

Closed emad-elsaid closed 8 years ago

emad-elsaid commented 8 years ago

Scenario

  1. open devtools
  2. choose a tool and open it
  3. copy the url and send it to a friend
  4. user opens the url
  5. github pages complain that the page doesn't exists

    Cause

ember use HTML5 history push by default so auto prefix tool for example has the url http://www.blazeboy.me/devtools/autoprefixer, github can't redirect user the index.html and can't be configured to do so.

Solution

We should use the #! notation instead so the autoprefixer tools should has http://www.blazeboy.me/devtools/index.html#!autoprefixer instead of http://www.blazeboy.me/devtools/autoprefixer also the whole app should has a switch in environment files to fix/ignore fix.

AmrEldib commented 8 years ago

I wonder if you can use 404 page to redirect to index.html/RouteName Read here

emad-elsaid commented 8 years ago

interesting, i didn't know that workaround, yes i think it could work. https://help.github.com/articles/custom-404-pages/ https://github.com/lionello/lionello.github.io/commit/c175f6524a53e29aea1890c8a758afd0e8944852

emad-elsaid commented 8 years ago

it didn't work, github can't find urls such as index.html/autoprefixer i think we'll need to fallback to the previously suggested workaround, using #! instead, any other ideas we can try?

emad-elsaid commented 8 years ago

it turns out that this is a simple configuration key in the environment :D