WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Is it possible to create a pretty/fake URL? (3 posts)

  1. MCM
    Member
    Posted 1 year ago #

    I have numerous podcast feeds.

    e.g.
    http://www.MyWebSite.com/feed/?post-type=audio&person=john
    http://www.MyWebSite.com/feed/?post-type=audio&person=joe

    http://www.MyWebSite.com/feed/?post-type=video&person=john
    http://www.MyWebSite.com/feed/?post-type=video&person=joe

    etc.

    Is it possible to somehow setup a fake url?

    e.g.
    http://www.MyWebSite.com/podcasts/john-videos
    http://www.MyWebSite.com/podcasts/john-audio

    Which then redirects and/or "hiddes" the ugly urls above?

    I have tried understanding the .htaacces in this regard and could not figure out how to do it...

    e.g. I tried

    RewriteRule ^podcasts/([A-Za-z0-9-]+)/?$ /feed/?post-type=video&person=$1 [NC,L]

  2. catacaustic
    Member
    Posted 1 year ago #

    The way that I can see it working is to use this as the regular expression:

    RewriteRule ^podcasts/([a-zA-Z0-9]*)-(audio|video)$ /feed/?post-type=$2&person=$1

    I haven't tried this, but I've checked the regular expression that that matches what you are looking for.

    If I'm right, all you would need to do is call ta URL like:

    http://www.mysite.com/podcasts/john/video

  3. MCM
    Member
    Posted 1 year ago #

    I found out this is not possible. Decided to use tinyURL.

Topic Closed

This topic has been closed to new replies.

About this Topic