• Okay, hopefully I am not asking the same question that has been has many times before. I looked it up and could only find the opposite of what I was trying to do.

    I am using WP as a CMS for a business site. Instead of the permalink options available by default, I want the url to be the name of the page that I am on.

    For example, instead of https://mysite.com/?page_id=3 I would like for it to say https://mysite.com/home or https://mysite.com/contact, etc. (where home and contact are the actual static page names)

    What is the mod_rewrite rule for this?

    Thanks –

    Mike

Viewing 3 replies - 1 through 3 (of 3 total)
  • %postname%

    ^ put that in the custom structure field. No need to manually edit your htacess file, wordpress will do that for you.

    Thread Starter shelzmike

    (@shelzmike)

    Nevermind! I am an idiot. I always make things harder than they are. I was able to accomplish this by simply changing the structure to %postname%

    Now, my question here is that I read in the Codex that it is not a good idea to use it this way..but I am simply using this for static pages in a CMS business website – is this still not a good idea and if not, why?

    Mike

    I have been using it for a while and have had no problems with it. I remembering reading elsewhere that the “not a good idea” suggestion was written for a much earlier version of wordpress. I prefer to use just the post name because it moves the keywords more towards the left which has SEO benefits plus it just looks cleaner.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘mod_rewrite to change url to page NAME, not id’ is closed to new replies.