Support » Fixing WordPress » Added a .html page via hyperlink but getting 404

  • Hi,
    Pretty much a beginner here so would really apreciate any help.
    I have a self hosted WordPress site based on the twentyseventeen theme
    I want to add a link to a “Twine” story, published as a .html file,(I have more than one story to add to a couple of pages on my site.) I want to use a hyperlink to allow users to access these stories.
    I have uploaded the .html files to the pblic_html folder in my cpanel’s file manager (this is the root folder of my website).
    I then added a link on the wordpress page via my WP dashboard.
    When I first did this at the start of the year the links worked fine, but now they throw up a 404
    I have tried changing the names of the files, moving them into thier own folder, but it doesnt make any difference.
    I read somewhere to add a line of code to the .htaccess but the code just directed every page on my site to my front page, though aybe I added it wrong.
    Any tips on this would be great!
    Thank you
    Oliver

    • This topic was modified 3 weeks, 5 days ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not a Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s actually not a WordPress issue if you can browse to the URL from your web browser.

    I’d have taken a look but you didn’t provide any links so, since you say they did work at one time, I figure your server has changed or there’s some sort of URL issue.

    Ask your web host.

    • This reply was modified 3 weeks, 6 days ago by JNashHawkins.
    Moderator bcworkz

    (@bcworkz)

    FYI, adding any .htaccess directive would not help at all. The way WP works is if any file actually exists on the server, that file is served. Only when the requested file cannot be found on the server does WP take over and tries to fulfill the request by querying its DB. So if you are getting a 404 error, the server was unable to find your .html file at the location requested. WP only came into play because the file could not be found and naturally WP couldn’t find anything either since WP doesn’t use .html files.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.