URL Rewrite Question
-
Greetings,
I am starting a new site using WordPress as my CMS. I’m having a delightful time working with it, and had a quick question regarding more advanced URL rewriting.
I am familiar with PHP, but this is my first time descending into the waters of editing the RewriteRules of .htaccess, and I’m quite lost.
I’m showing a design portfolio where items may exist in multiple categories, and I want to somehow retain the path the user has taken via two query strings ($ref1 and $ref2, respectively).
Currently, I’m using the Top Level Categories plugin so that pages viewed at
/interactive
show the “interactive” category. My permalink structure for individual posts is/%year%/%monthnum%/%day%/%postname%/
Normally, I would just use the
%category%
tag at the beginning of the permalink URL. The problem with this solution is that it doesn’t maintain the path the user has taken to get to the content.What sort of RewriteRule would I need to accomplish the following URL rewrite structure for permalinks:
/($ref1)/($ref2)/%year%/%monthnum%/%day%/%postname%/
It would also be great (but not as necessary) if it would work with only one referring title as well:
/($ref1)/%year%/%monthnum%/%day%/%postname%/
For clarity, what I’m looking for is if the permalink structure exists, check the preceding 2 directory names and allow them to act as query string variables
ref1
andref2
.Any help would be very appreciated, thanks very much!
- The topic ‘URL Rewrite Question’ is closed to new replies.