Support » Fixing WordPress » Custom Page Parameters

  • I have a page called ‘artworks’

    http://domain.com/artworks/

    Now I want to pass it a parameter, with nice permalinks and it will change accordingly. So what I have done now is alter the .htaccess by putting in an extra IfModule above the wordpress rules.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test/wordpress/
    # RewriteRule artworks/([^/.]+)$ artworks/$1/ [R]
    # RewriteRule artworks/([^/.]+)/?$ artworks/?a=$1 [L]
    </IfModule>

    However, that doesn’t work, as the result is

    http://domain.com/artworks/somestring/

    Which is what I want, but wordpress interprets that as a subpage and gives me a 404. Which surprises me because I thought it would interpret ?a=somestring.

    Also, if the result is

    http://domain.com/artworks/somenumber/

    I can actually get the data via $_GET[‘a’], which gives me a number. But again, I don’t really want to have some random number in the URL.

    Does anyone have a workaround for this? Would be most helpful, thanks. I don’t really want to do this

    http://domain.com/artworks/?a=somestring

    As it doesn’t fit in with the rest of the permalinks in the site.

    Thanks again
    Daz

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Page Parameters’ is closed to new replies.