Dumb newbie crashed site (5 posts)

  1. TomTomGuy
    Posted 4 years ago #


    I tried to fix some broken links on our blog, but as a complete newbie who just wanted to help the others out, I made things worse.

    The simple (and probably totally dumb) question is:
    On "Edit Page" I want to edit the link to the current page using the field "Permalink". The point is, the page should be placed in a folder, not in root of the website. But whatever I try, the link never contains a folder.

    E.g. the page should have the link:

    So I enter in the "Permalink" field:

    But I get:

    In Settings / Permalinks, there is the "Custom Structure" marked and the entry is:

    Thanks for your help!

  2. Roscius
    Posted 4 years ago #

    Unless you only have one 'folder', one way to do this would be to create a placeholder page for each folder, ie ourwebsite/folder and then make the pages that you want to be in the folder children of this new page representing the folder, ie 'page' would be a child page of 'folder' (which is the placeholder page).

    Using categories might be another way to achieve the URL structure that you are looking for...you would then change your permalink structure to /%category%/%postname/ and assign the pages to a category which then becomes your 'folder'.

  3. TomTomGuy
    Posted 4 years ago #

    Hi roscius,

    thank your for your answer.

    What I forgot to say is that the folder I want to put the page in already exists. There are other pages already in this folder. Their permalinks look like they shoud, e.g.

    So I want to add the current page to this "folder".

    And when I, just for trying, try to change the permalinks of page2 or page3, the "folder" cannot be changed, just the filename can be...

    Best regards

  4. Roscius
    Posted 4 years ago #

    When WordPress loads a URL it converts the permalink structure to parameters to determine what content to load,

    eg /mysite.org/blah/fred might be converted to something like mysite.org?p=blah&r=fred

    This is why WordPress is removing the slashes, they would break this process, it is at the heart of the permalink system.

    If you can't achieve the URL structure by categories or sub-pages, another way might be to use URL rewrites in your .htaccess file, you could rewrite /ourwebsite/folder/page2 to ourwebste/page2

    Rewrite rules are relatively complicated if you haven't done them before: http://httpd.apache.org/docs/current/mod/mod_rewrite.html but if you jump on the #wordpress IRC channel at freenode http://codex.wordpress.org/IRC , I'm sure there's someone on there that will give you a hand in figuring out the correct rewrite rule to add.

  5. TomTomGuy
    Posted 4 years ago #

    Hi roscius,

    thank you for your help, that was really nice! Unfortunately, I am too much a noob concerning WordPress and I am afraid of creating even more damage.

    So I think I will have to contact our Admin and tell him to please fix what I was trying to help. ;-)

    Thanks and best regards

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.