• Hey everyone. Just wanted to ask a quick question. Using a downloaded version of WordPress, as in an install on a non wordpress server, is it possible to forward a page? I want to make it so that when someone click a page in the top bar, it takes them to a different website. Is that possible?

    Thanks,
    Techgeek

Viewing 12 replies - 1 through 12 (of 12 total)
  • I would like to know as well. ??

    Do you mean redirect to different page? Sure you can. What is a non-wordpress server btw?

    I think he mean to direct it to a different link. Is that possible?

    Let’s say you want to have a page titled “Redirect Page” that would redirect to https://someothersite.com/ . So here’s what you need to do:

    1. Create an empty page called “Redirect Page” with the slug redirect.

    2. Create a file in your theme directory called redirect.php (the name of the file must match the page slug exactly).

    3. In that file, put the following:

    <?php 
    
    header('Location: https://someothersite.com/');
    die();
    
    ?>

    Be sure that the file starts with <?php and there is no whitespace in front of the <.

    This will create an (empty) page, which would redirect to the specified URL.

    Thread Starter techgeek

    (@techgeek)

    NC@WP, you answered my question. mercime, I consider a non wordpress server one that wordpress does not own. I do have one question. What is the slug of a page/how do you edit it?

    techgeek,

    If you have a page that you can access as www.yoursite.com/yourpage, yourpage is the slug. By default, the slug is a modified (“nice”) representation of the page title (lower-case, with whitespace replaced by dashes). As to editing it, the procedure depends on the WordPress version you’re running…

    Thread Starter techgeek

    (@techgeek)

    OK, slight problem. When I make a page, the end is like “?pageid=19” or something like that. Also, the page is called forum, and I have a directory called forum on the webserver. How can I combat this?

    techgeek,

    When I make a page, the end is like “?pageid=19” or something like that.

    The page still has a slug, and WordPress would still search for a corresponding page file in the theme.

    Also, the page is called forum, and I have a directory called forum on the webserver. How can I combat this?

    There’s nothing to combat. The forum page will redirect to forum one way or another. See this post in my blog. Or is this something you are actually trying to avoid?

    Thread Starter techgeek

    (@techgeek)

    I got it. I had to mess with a permalink thing.

    I followed these instructions to the letter and I still can not get it to work. Is there something I am missing?

    HI NC@WP,

    Create an empty page called “Redirect Page” with the slug redirect.

    Where do I create that page? In the dashboard – where I add a page? Or in the theme folder using notepad?

    Thnaks for helping a newbie

    I figured it out. You have to put the redirect.php file in the TOP wordpress directory, the same directory that has index.php and wp-app.php and the readme in. Putting it in the Theme directory doesn’t work for me, at least on my version of WordPress (2.7)

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Is it possible to forward a page?’ is closed to new replies.