A Different Permalink

Discussion in 'WordPress' started by Kurtaran, Aug 19, 2010.

  1. #1
    i have a problem about permalinks in wordpress;

    For example i have 2 category (cat1 and cat2).
    And there is two posts (post1 and post2).
    post1 is in categroy cat1 and post2 is in categroy cat2.
    In permalink Settings i'm using Custom Structure like this:
    /%category%/%postname%/
    Code (markup):
    So, url of post1 is "http://mysite.com/cat1/post1/" and again url of post2 "http://mysite.com/cat2/post2/"

    Now i wanna do something like this;
    when i wanna call a post in cat1 its url , its url: "http://mysite.com/cat1/post1/" but when a post in cat2 i want its url to be like this: "http://mysite.com/something/cat1/post1/"

    So i wanna write different rewrite rules for different categories, something like that.
    How can i write a permalink code for wordpress.
    Or do i have to edit .htaccess file. if so what kind of codes can i write in my .htaccess file.

    please help me!
     
    Kurtaran, Aug 19, 2010 IP
  2. kiramanic

    kiramanic Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Give cat2 a parent category called "something". Now when you write a post you choose cat2 from the category list (no need to check both of them, just cat2 will do) but WP will know that cat2 is a child of "something" and give you the URL mysite.com/something/cat2/postname
     
    kiramanic, Aug 19, 2010 IP
  3. Kurtaran

    Kurtaran Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you for your help but my problem is not simple like this.
    it can be ok for the url "mysite.com/something/cat2/postname" but i can't use sub-categories...
     
    Kurtaran, Aug 19, 2010 IP
  4. kiramanic

    kiramanic Peon

    Messages:
    205
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Sorry maybe I misunderstood the original question. Why can't you use subcategories?
     
    kiramanic, Aug 19, 2010 IP
  5. Kurtaran

    Kurtaran Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok this may be an option but i want to learn is there another way to solve my problem?
     
    Kurtaran, Aug 20, 2010 IP
  6. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #6
    Jalpari, Aug 22, 2010 IP