Support » Plugin: Redirect URL to Post » Great Plugin but I need help.

  • Resolved vendravex

    (@vendravex)


    this plugin is awesome,

    need help to keep my URL redirect to a random posts.

    ex i have domian like website.com/post-redirect/?go=product

    then I used redirection to redirect that URL like

    source: website.com/post-redirect/?go=product
    Target: website.com/?redirect_to=random

    how to keep my url ?go=product to random post.?

    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Chris

    (@camthor)

    If you need to redirect all URLs that have ?go=product then try this code in your .htaccess file (at the top):

    
    RewriteEngine On
    RewriteCond %{QUERY_STRING} go=product
    RewriteRule ^(.*) /?redirect_to=random [L,R=301]
    

    If you also need that /post-redirect/ part you could try:

    
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/post\-redirect/$
    RewriteCond %{QUERY_STRING} go=product
    RewriteRule (.*) /?redirect_to=random [L,R=301]
    

    If you cannot access your .htaccess file you could try a plugin that lets you redirect to custom URLs.

    Please note that ?redirect_to=random always goes to posts, while you write go=product.

    Thread Starter vendravex

    (@vendravex)

    thanks for your answer

    but I need to keep the URL go=product into random post

    source: website.com/post-redirect/?go=product
    Target: website.com/?redirect_to=random

    then
    website.com/random-post/?go=product

    I want to keep the URL ?go=product into my new random post

    Sorry, my English is bad, thank you

    Plugin Author Chris

    (@camthor)

    Currently it is only possible to add tracking parameters. I will think about a possibility to whitelist more parameters (maybe in a constant) so that also “go” would work.

    Thread Starter vendravex

    (@vendravex)

    Thank you for the response, I hope for the next update

    Plugin Author Chris

    (@camthor)

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.