SOLVED Trying to organize my files without breaking my website

DreadnoughtDev

Registered
Dec 26, 2017
1
0
1
Millersburg, PA
cPanel Access Level
Website Owner
Okay, so when I first uploaded my stuff to cPanel, they were in an absolute mess, with the HTML files scattered here and there. Sure, the website worked, but I hated the organization that the files had. So, I did the logical thing: I organized the files and put them in their own folders. However, the problem was, when I later went to access my site, it returned a 404 error. It seems that when I try to do this, the files can't access each other. How can I organize them without breaking the website? Thanks!
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
457
113
UK
cPanel Access Level
Root Administrator
You can organise your files however you want, but if you move them, you will have to tell the HTML where they can now be found.

Easiest is to audit your code and add the new folders to any paths that exist.


So, say you had a file in the webroot and called it using
HTML:
<IMG src="somefile.jpg" width="671" height="696" align="left" border="0">
and you them moved the file into an /images folder, you would have to change the code to
HTML:
<IMG src="images/somefile.jpg" width="671" height="696" align="left" border="0">
Hope this helps.
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello,

The previous post answers your question. I've marked this thread as solved.

Thanks!