Surendra Yonjan
Surendra Yonjan

Reputation: 1

how to add page name in url of wordpress

In my wordpress site I have two types of pages: About Us and News. The About Us page is just a general page that contains some site information whereas page News will contains posts from admin.

So, is it possible to configure wordpress so that:

  1. url: http://localhost/worpress/about-us will direct to my About Us Page
  2. url: http://localhost/wordpress/news will direct to my News pages
  3. url: http://localhost/wordpress/news/?p=123 will direct to specific news posted under News Page.

Any links to tutorial will surely help more.

Thanks

Upvotes: 0

Views: 957

Answers (1)

rnevius
rnevius

Reputation: 27092

You're asking about what WordPress refers to as Pretty Permalinks.

Please see the link above, but in a nutshell...

Requirements:

  1. Apache web server with the mod_rewrite module installed
  2. In WordPress's home directory:
    • The FollowSymLinks option enabled FileInfo directives allowed (e.g. AllowOverride FileInfo or AllowOverride All)
    • An .htaccess file (if this file is missing, WordPress will try to create it when you activate "pretty" permalinks)
    • If you want WordPress to update the .htaccess file automatically, WordPress will need write access to the file.

You'll then want to head to the admin and change your Permalink settings to point to Post Name.

Upvotes: 2

Related Questions