1

Suppose I have in 1 file and 1 folder in my repository :-

  1. index.html
  2. folder

Folder contains again 1 file namely :

  1. work.html

Now I want to open folder website with link only of

username.github.io/repositoryname/folder

Not as

username.github.io/repositoryname/folder/work.html

Is there any way to achieve that ?

Mansi Shukla
  • 377
  • 3
  • 23
  • This should be the default behavior. For eg. http://bajal.github.io/stuff/index.htm and http://bajal.github.io/stuff both work – Bajal Jan 13 '19 at 13:50
  • what if the file name is another than index.html ? sorry unable to explain it properly @Bajal – Mansi Shukla Jan 13 '19 at 13:54

1 Answers1

1

You can access username.github.io/repositoryname/folder/work.html from username.github.io/repositoryname/folder by adding a blank index.html file inside repositoryname/folder/ and adding the following line to it:

<meta http-equiv="refresh" content="0" url="http://username.github.io/repositoryname/folder/work.html" />

Solution was originally posted by @DavidJacquel for a different issue (load main user site from a subfolder index.html) but the approach should work with this issue too.

AndrewL64
  • 15,794
  • 8
  • 47
  • 79