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

    (@aitpro)

    I think what would be best is to create an .htaccess redirect rule instead of trying to do the redirect the way you are currently doing this. Search Engines will penalize your website if they think you are doing something shady with redirects so you want to be careful about that. Also this somewhat simulates an RFI hacking attempt partially, so that would be another reason not to redirect this way.

    I don’t completely understand exactly what and why you are doing what you are doing so if you can explain everything in more detail then I can provide a better .htaccess redirect solution/code.

    Or you can just standardize your URL/Query structure if you want to do that.

    https://www.mysitename.com/go/?src=https://www.externalsitename.st

    [deleted code that was not relevant]

    Thread Starter Unkown

    (@dangerell)

    Hi,

    Thank you for the quick reply.

    I tried replacing the code you said, cleared cache but i get same 403 error. I even tried removing, not just replacing those lines from the .htaccess and still getting error 403.

    I do it so i can show additional info/ads before users leave the site or go to particular pages from the site.

    I use it long time and now lots of links are already shared on the net in that form and when they are accessed now users see only error page.

    Temporary i’ve set a 3 seconds redirect to index from the 403 error page so i won’t stuck the users on the error page.

    Other suggestion?

    Plugin Author AITpro

    (@aitpro)

    I deleted that .htaccess security code because it was not actually relevant to the problem. Can you fix your malformed URL and Query string? That would probably be the second best thing to do.

    Plugin Author AITpro

    (@aitpro)

    Another possibility would be to create a RewriteRule (“skip/bypass”) rule for your exit page named “/go/”.

    https://forum.ait-pro.com/forums/topic/custom-applications-outside-of-wordpress-3rd-party-apps/

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # RewriteRule for Custom Apps outside of WP
    RewriteRule ^go/ - [L]
    Thread Starter Unkown

    (@dangerell)

    Great!

    Just added those two extra lines in the root htaccess.

    # RewriteRule for Custom Apps outside of WP
    RewriteRule ^go/ - [L]

    Now it works!

    Thank you very much!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Problem when using another site url in link’ is closed to new replies.