WordPress.org

Ready to get started?Download WordPress

Forums

URL Problems (4 posts)

  1. btomw
    Member
    Posted 7 years ago #

    I'm having some problems with my blog, specifically with how wordpress uses the URI. The the blog is located at http://bsu.edu/blogcaster2/jason/. If you go there and click on the Previous link down at the bottom of the page, you'll see that the wordpress generated link is to ../jason/jason/index.php?paged=2 . I can't figure out why it does that, adding in the second /jason, but it makes that link not work, it breaks the search function, it makes logging in a pain in the arse, and it break plug ins on occasion. Can any one help me out with this problem?

  2. byorgey
    Member
    Posted 7 years ago #

    I was having a similar problem -- my blog is located at http://www.mathlesstraveled.com, but it's set up as a virtual host. The problem I found was that PHP was reporting a strange value for REQUEST_URI: A page such as mathlesstraveled.com/page.php would have a reported REQUEST_URI of /~byorgey/wordpress/page.php (instead of just /page.php), which was the directory it resided in as far as the server was concerned, but of course doesn't work if you type it in the URL bar of a browser. I was able to get around this with a hack, adding the following line to wp-settings.php:

    $_SERVER['REQUEST_URI'] = str_replace('/%7Ebyorgey/wordpress/', '', $_SERVER['REQUEST_URI']);

    (Of course that should all be one line.) Probably not the best way to solve the problem, but it works. Of course if you do this you should replace /%7Ebyorgey/wordpress/ with jason/ or whatever is appropriate.

  3. btomw
    Member
    Posted 7 years ago #

    It's not working for me.... Is there a specific place I should put it in inside the settings file?

  4. btomw
    Member
    Posted 7 years ago #

    I think our problems may be different, though your work-around does indeed work. I had to find exactly where each individual link was being generated and do a str_replace within the function where the links were being created.

    Crazy, I know. However, I think I might be able to fix things now. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags