Title: URL Problems
Last modified: August 18, 2016

---

# URL Problems

 *  [btomw](https://wordpress.org/support/users/btomw/)
 * (@btomw)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/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/](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)

 *  [byorgey](https://wordpress.org/support/users/byorgey/)
 * (@byorgey)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/url-problems/#post-463837)
 * I was having a similar problem — my blog is located at [http://www.mathlesstraveled.com](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.
 *  Thread Starter [btomw](https://wordpress.org/support/users/btomw/)
 * (@btomw)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/url-problems/#post-464014)
 * It’s not working for me…. Is there a specific place I should put it in inside
   the settings file?
 *  Thread Starter [btomw](https://wordpress.org/support/users/btomw/)
 * (@btomw)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/url-problems/#post-464083)
 * 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.

## Tags

 * [path](https://wordpress.org/support/topic-tag/path/)
 * [uri](https://wordpress.org/support/topic-tag/uri/)
 * [url](https://wordpress.org/support/topic-tag/url/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [btomw](https://wordpress.org/support/users/btomw/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/url-problems/#post-464083)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
