Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED Trying to organize my files without breaking my website

Discussion in 'General Discussion' started by DreadnoughtDev, Dec 26, 2017.

  1. DreadnoughtDev

    DreadnoughtDev Registered

    Joined:
    Dec 26, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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!
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    618
    Likes Received:
    192
    Trophy Points:
    43
    Location:
    Spain
    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.
     
    cPanelMichael likes this.
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

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

    Thanks!
     
Loading...

Share This Page