URL Problems

  • 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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

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

    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.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘URL Problems’ is closed to new replies.
Skip to toolbar