Support » Fixing WordPress » Directly to subpage when root page is selected

  • Is there a way to go directly to a certain sub page when a page is selected? Example: I have a Gallery page with subpages Gallery1, Gallery2, etc. So I would like to go directly to Gallery1 when the user navigates to Gallery root page.. Thanks!!!

    PS. I asked this alredy, but can not find the post now. I really have to say that the search engine on this forum needs improvement. Or the post has been deleted for some reason.

Viewing 5 replies - 1 through 5 (of 5 total)
  • There are different ways.

    Use .htaccess

    use an index.php which redirects to the subpage

    So in index.php I check if the page is Gallery page and then redirect to Gallery1? Ok. I will try that, trying to find the right methods 🙂 Thanks!

    You put a new index.php in your gallery-subdir


    header (‘HTTP/1.1 301 Moved’);
    Header(‘Location: http:/’);


    Use two // not one in url

    Thank you for your reply! But what do you mean by “index.php in your gallery-subdir”? WordPress pages are stored in a database, right?

    but if you use permlinks the htaccess checks if the file exists. If so it will serve out the file.
    It is possible that the wordpress shows malfunctions after creating a subdir, it normally uses virtually. (I didn’t try). In that case you have to redirect via htaccess

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Directly to subpage when root page is selected’ is closed to new replies.