Title: fooling the permalink
Last modified: August 18, 2016

---

# fooling the permalink

 *  Resolved [micasuh](https://wordpress.org/support/users/micasuh/)
 * (@micasuh)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/fooling-the-permalink/)
 * I am here from Moveabletype and can’t find an answer to my problem after having
   searched for a long time so I feel I must post this question.
 * In Moveabletype, I am able to view my archives by date, week, month, or individually.
   I want this ability from WordPress 2.0 as well. But, my question is about permalinks
   in relation to said request.
 * If I change the permalink structure to somethingn like /%year%/%monthnum%/%day%/%
   postname%/, does that mean I’ll automaticallly be able to search by not only 
   postname but by day, month and year? What about category based searches?
 * And this leads to my next question. Instead of the post showing up as /%year%/%
   monthnum%/%day%/%postname%/, is there a way that I can fool the browser to only
   see [http://www.website.com/%postname%](http://www.website.com/%postname%) when
   the structure is actually [http://www.website.com/%year%/%monthnum%/%day%/%postname%/](http://www.website.com/%year%/%monthnum%/%day%/%postname%/).
 * And lastly, does the permalink option work for static pages? I created many pages
   with the Manage>Pages because the information isn’t going to be like a blog and
   will stay static. However, when I enable permalinks and then refresh the website,
   the structure of the links is still ?page_id=4 or whatever is the case. What 
   am I not doing correctly?

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

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 5 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-320957)
 * RE: Query-aware search.
 * You can perform date-based and category searches, though this would mean at the
   very least a change to the search form (or require a separate one for such searches).
 * With custom permalinks, to have a search performed within the current “query 
   space” alter the action attribute of the search form. This is usually something
   like `"<?php echo $PHP_SELF; ?>"`, which calls the search from the referring 
   document (in the case of WordPress, the root index.php). Changing it to `""` 
   would perform the search from the current query/url.
 * RE: Combining /%year%/%monthnum%/%day%/%postname% and /%postname% permalinks.
 * You mean like this?
 * [http://guff.szub.net/2004/10/21/behind-the-scenes-at-guff/](http://guff.szub.net/2004/10/21/behind-the-scenes-at-guff/)
   
   [http://guff.szub.net/behind-the-scenes-at-guff/](http://guff.szub.net/behind-the-scenes-at-guff/)
 * Obviously the answer is *yes* (I call it duplex permalinking). I merely added
   the following lines to my .htaccess:
 * `RewriteRule ^([_0-9a-z-]+)/?$ /index.php?name=$1 [QSA,L]
    RewriteRule ^([_0-
   9a-z-]+)/([0-9]+)?/?$ /index.php?name=$1&page=$2 [QSA,L]
 * This is something you have to handle outside WordPress though, as it’s only ever
   aware of the internal or default permalink structure (?p=100), and whatever current
   permalink structure you’ve set it to. One (you might call serious) limitation
   is since requests are passed through WordPress with this, accessable directories
   on your site may generate a 404 (not found) error *unless* one calls the default
   document (i.e. index.php, index.html, etc.) directly.
 * RE: Pages
 * Pages should be set to urls of [http://site/page-name/](http://site/page-name/),
   so I can’t say what would cause Page links to retain the default permalink structure.
   Could be a browser cache issue. With WordPress 2.0, might even be a WP cache 
   one…
 *  Thread Starter [micasuh](https://wordpress.org/support/users/micasuh/)
 * (@micasuh)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-321054)
 * Hmm… well, it seems that until I can actually get permalinks to work in the first
   place nothing else I said really matters.
 * If you want to take a look at the site, it’s [http://www.stopthethyroidmadness.com](http://www.stopthethyroidmadness.com).
   Permalinks are currently enabled in options>permalink but don’t show up as I 
   activated them.
 * And yes, mod_rewrite is installed.
 *  Thread Starter [micasuh](https://wordpress.org/support/users/micasuh/)
 * (@micasuh)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-321170)
 * When I go to options>permalinks and enable permalinks to look like the following,/%
   year%/%monthnum%/%day%/%postname%, it doesn’t resolve any of my pages as such.
 * All of my pages that are currently up on the website were created using the write
   >pages setup. These are all static pages and won’t change much if at all.
 * Does anyone have any ideas of how to solve this problem so that I can move on
   to some of my other ideas?
 *  [mainewebworks](https://wordpress.org/support/users/mainewebworks/)
 * (@mainewebworks)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-321176)
 * Hi,
    It is an odd problem for sure. Curious – why does your domain name have 
   a “dot” at the end of the TLD? [http://www.stopthethyroidmadness.com./](http://www.stopthethyroidmadness.com./)
 * Another question: How are you generating your sidebar list of pages? Is it a 
   sort by the page id# using the [wp_list_pages()](http://codex.wordpress.org/Template_Tags/wp_list_pages)
   tag? The answer[might] be in how the tag is configured.
 * I’m trying to do the same as you did – many “Pages” but using the [“Slug” as the permalink](http://wordpress.org/support/topic/57885?replies=7)
   instead of post id or title.
 *  Thread Starter [micasuh](https://wordpress.org/support/users/micasuh/)
 * (@micasuh)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-321178)
 * Here’s an update on my situation.
 * What I never understood, nor was made clear at all anywhere in the permalinks
   page (at least from my understanding), that links to other static pages must 
   be coded statically. I was always under the impression that you could link to
   a dymanic code which would then be generated using a slug.
 * Here’s exactly what I mean:
 * In my sidebar, for each of my links, I’ve hard coded the post id. So, my links
   read “?page_id=#” where # is the actual page created that is located in Manage
   >Pages section in the control panel. These are hard coded into my sidebar in 
   the template section.
 * What I had assumed was by turning on Permalinks in the Options>Permalinks section,
   every instance of “?page_id=# would dynamically convert to my page slug which
   can be found in the Manage>Pages section for each individual page. However, it
   seems that enabling Permalinks does not change this for static pages but rather
   posts.
 * So, if I go into Options>Permalinks, I currently have activated the Permalink
   structure /%year%/%monthnum%/%day%/%postname% for any posts. When I view my website,
   I still see the page id code for all my links. This is where my assumption was
   wrong, at least for static pages.
 * So, what I’m going to do now is go into every link that I have for my sidebar
   and within the body and hard code the page slugs into the site. This is a little
   frustrating because I was hoping this dynamic Permalink structure would work 
   for everything, but I have since found out it doesn’t. I’ll post my results once
   I’ve completed this task.
 * Unless, is there another answer or solution that I’m missing?
 *  [mainewebworks](https://wordpress.org/support/users/mainewebworks/)
 * (@mainewebworks)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-321184)
 * Yes. I’m in the same boat – trying to decide what to do myself at the moment.
   When I saw your sidebar, I had hoped you were using a template tag that did it
   for you and not hardcoding the url.
 * In another post, it was suggested to use the Manage Links in admin and hard code
   the Page link into the sidebar. Here’s that post link : [http://wordpress.org/support/topic/57885?replies=7](http://wordpress.org/support/topic/57885?replies=7)
 * –
 *  Thread Starter [micasuh](https://wordpress.org/support/users/micasuh/)
 * (@micasuh)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-321187)
 * After replacing all of my post id links with static links of my slugs, everything
   seemed to work just fine. It’s annoying that this can’t be dynamic but whatever
   works will have to do for now.
 * Once I get my blog up, I’ll then want to see if i can change the Permalink structure
   so that it appears as though I’m looking at the same structure as my static pages
   now appear as Kafkaesqui explained above.

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

The topic ‘fooling the permalink’ is closed to new replies.

## Tags

 * [moveable type](https://wordpress.org/support/topic-tag/moveable-type/)
 * [postname](https://wordpress.org/support/topic-tag/postname/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [micasuh](https://wordpress.org/support/users/micasuh/)
 * Last activity: [20 years, 4 months ago](https://wordpress.org/support/topic/fooling-the-permalink/#post-321187)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
