• bang

    (@bang)


    Not sure if there is an easy way to do this.
    I’m trying to make it so “site.com/?page_id=7” can be linked as “site.com/7”. I know that with slugs you can make it look like “site.com/?page_id=testtitle” or whatever, but I was wondering if there was an easy way to make it show up without the “?page_id=” part.

    My guess is the only way to do this is create a directory for each page, and put in a header redirect in the htaccess of the directory to link to “site.com/?page_id=7”.

    Any ideas?
    Thanks.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Cypher

    (@cypher)

    Enable permalinks on your site and you will be able to access your pages as; site.com/<page-slug>. That makes it eaiser to find for your visitors than site.com/7 or site.com/9..

    Regards

    eridan

    (@eridan)

    You could write your own mod_rewrite rule..

    Cypher

    (@cypher)

    Or have WP do it for you. 🙂

    Thread Starter bang

    (@bang)

    Worked.
    Thank you.

    Thread Starter bang

    (@bang)

    You just saved me a boatload of time 😉

    Thread Starter bang

    (@bang)

    Quick question though…
    when WP is referring to the .htaccess file, is it the htaccess file for the domain, or the htaccess for the server root?

    Cypher

    (@cypher)

    Well that depends on your server structure I guess. Some hosts allow you to have multiple fully-hosted domain within a single account, in that case WP will be playing with the .htaccess that pertains to the domain on which it is installed.

    Regards

    Thread Starter bang

    (@bang)

    It seems something got messed up here too…
    In my links bar (that links to the catagories) it automatically prefixes the links with /catagory/ so the links that should show up as “site.com/cat-name” show up as “site.com/catagory/cat-name” and I can’t find anywhere to change this…
    Weird. Anyone know what is causing this?
    Thanks a lot.

    Thread Starter bang

    (@bang)

    Ah thanks Cypher.

    Cypher

    (@cypher)

    What is your permalinks structure? That’s where /category/ is usually coming from.

    Regards

    Thread Starter bang

    (@bang)

    Uh oh…
    I can’t create new pages anymore either. Well, I can create them but when I go to them it says “Sorry, no posts matched your criteria.”

    Thread Starter bang

    (@bang)

    The permalinks structure is “/%postname%”. That’s it.

    moshu

    (@moshu)

    For creating new Pages and being able to use the permalinks with them your .htaccess file has to be writeable ALL the time, so WP can write the new rules into it every time you create a new Page.

    Thread Starter bang

    (@bang)

    Moshu, it is writtable: 666.

    Thread Starter bang

    (@bang)

    I also see that it IS writting to the htaccess….
    Odd.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Custom page urls?’ is closed to new replies.