Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Colin Murphy

    (@colin-murphy)

    Any help would be grateful as I am really stuck on this issue.

    What do mean “it adds the query string”? Queries other than ?album=nightlife? Why do want to use /?album=nightlife instead of /album/nightlife? You’re essentially undoing a bit of your pretty permalinks which results in a less friendly url.

    Thread Starter Colin Murphy

    (@colin-murphy)

    Hi Big Bagel.

    Sorry if i was not clear enough so when you go to the URL /bodega/gallery/album/nightlife it changes the URL to /bodega/gallery?album=nightlife

    Yes i want to keep the pretty URL and also on the server side run the query

    Ah…you’re trying to do an internal rewrite so you can use the nice url. Got it.

    I would assume that it changes the shown url in your first example because the full address makes it think it’s an external redirect. Why don’t you make your second example [R,L] so that you can see what url it’s trying to rewrite to. Once you see the problem you can fix it and take out the R. I wouldn’t trust my skills with any regex, but yours looks ok to me.

    Is this query something not related to WordPress? (Custom taxonomies and such should still be able to make use of the normal WordPress rewrite rules to look nice)

    Thread Starter Colin Murphy

    (@colin-murphy)

    I removed the first RewriteRuleand added [R,L] to the second RewriteRule.

    It is working but still adding the query string to URL instead of the pretty URL.

    Its related to calling out NGG Galleries.

    The NextGEN Gallery plugin doesn’t automatically use nice permalinks or have a setting for it? I thought the author added that a while ago. Since this is specifically for that plugin you might get some more informed answers by asking the plugin author directly or at least adding the relevant tag (nextgen-gallery) to this topic in order to make it show up on the NextGEN plugin page.

    Adding the R was to see exactly what URL the server would use with your second rewrite rule (since you said it was causing a 404). If everything worked, then removing the R should do exactly the same but without changing the shown URL.

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

The topic ‘htaccess rewrite’ is closed to new replies.