Can I redirect the default notebook URL?

I have the following jupyterhub work directory:

work/
    example1.ipynb
    example2.ipynb

Because I have this configuration in jupyterhub_config.py:

c.Spawner.default_url = "/user/{username}/lab/tree/example1.ipynb"

So when the user opens URL 127.0.0.1:8001, and logs into jupyterhub, the web will show the example1.ipynb.

Base on above process, is there a way I can do this?
When the user opens URL 127.0.0.1:8001/example2, and logs inoto the jupyterhub, the web will show example2.ipynb?

I find a way to do it, which is mentioned on this. It is very simple: /user-redirect/path_to_ipynb. Thanks a lot.

1 Like