0

So i have deployed my project on Github. It is a web development project. All my html files are in a repo folder including index.html with the link as username.github.io/projectName/ . When i am opening my repo Github page, the index.html opens up but when I click on any button, it redirects to username.github.io/webpageName . I had linked the button using href = /webpageName.html . Even my scripts/ css/ images are not loading because of this. Even though username.github.io/projectName/webpageName is working but i want it automatic and not by changing the codes. How can i do it?

torek
  • 448,244
  • 59
  • 642
  • 775
  • "*â€Ķi want it automatic and not by changing the codes. How can i do it?*" You cannot. No way. – phd Apr 13 '22 at 13:15

1 Answers1

-1

Are you using .htaccess file?

If yes, then check if your .htaccess file have some errors or not.

If no, then change your href url to your github repo page url's For example: from

`href = /webpageName.html` to 
`href = https://github.com/<user_name>/<repo_name>/<file_name>`

Just like that

Debashis Sahoo
  • 5,388
  • 5
  • 36
  • 41