Title: WordPress: Custom URL
Last modified: August 20, 2016

---

# WordPress: Custom URL

 *  [Muhammad Sajid](https://wordpress.org/support/users/webspot49/)
 * (@webspot49)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/wordpress-custom-url/)
 * At front end I fetches some links from mysql db table like:
 *  `<a href=”[http://localhost/my_site/detail/Link-1″>Link](http://localhost/my_site/detail/Link-1″>Link)
   1</a>
    <br /> <a href=”[http://localhost/my_site/detail/Link-2″>Link](http://localhost/my_site/detail/Link-2″>Link)
   2</a> <br /> <a href=”[http://localhost/my_site/detail/Link-3″>Link](http://localhost/my_site/detail/Link-3″>Link)
   3</a>`
 * and from admin side **Setting -> Permalink** I set `http://localhost/sparcs/sample-
   post/`
    and also create a page and named **detail** whose url is exactly **[http://localhost/my_site/detail/](http://localhost/my_site/detail/)**
 * but when I click to any links WP says
 * > Apologies, but the page you requested could not be found. Perhaps
   >  searching
   > will help.
 * though I could use `<a href="http://localhost/my_site/detail/3">Link 3</a>` and
   it works fine & I could get url info using `pathinfo($_SERVER['REQUEST_URI']);`.
 * Actually I create custom url in by db table and then show these url on my WP 
   page leftbar and want if I click it wp show the page and I could be able to catch
   url info with `pathinfo($_SERVER['REQUEST_URI']);`
 * I also used **Custom Structure** and set `http://localhost/my_site/detail/url`
   but not work.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [RichardWPG](https://wordpress.org/support/users/richardwpg/)
 * (@richardwpg)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/wordpress-custom-url/#post-2920922)
 * [http://codex.wordpress.org/Using_Permalinks](http://codex.wordpress.org/Using_Permalinks)
 *  Thread Starter [Muhammad Sajid](https://wordpress.org/support/users/webspot49/)
 * (@webspot49)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/wordpress-custom-url/#post-2920925)
 * I have read this in detailed & this does not cover my problem. Let me clear more.
   My links like **Link 1, Link 2** are not like a regular **WP posts** I created
   them form my framework in **mysql db table** and fetch in left sidebar on href
   I used _**url field**_ (fetches from db table) which is _**Link-1, Link-2**_ 
   in this case and on **detail** page template I just fetch records from db table&
   show.
 * Now if I use _**id field**_ it works fine but when i replace id field with url
   field it says
 * > Apologies, but the page you requested could not be found. Perhaps
   >  searching
   > will help.
 * **Now it is more clear**
 * I thing it is something from **WP boot-striping**
 *  Thread Starter [Muhammad Sajid](https://wordpress.org/support/users/webspot49/)
 * (@webspot49)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/wordpress-custom-url/#post-2920941)
 * I think it might be solve using
    **rewrite.php** in
 * > wp-includes/rewrite.php
 * but I don’t know how & which function should be modify.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress: Custom URL’ is closed to new replies.

## Tags

 * [php5](https://wordpress.org/support/topic-tag/php5/)
 * [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: [Muhammad Sajid](https://wordpress.org/support/users/webspot49/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/wordpress-custom-url/#post-2920941)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
