简体   繁体   中英

PHP - Remove the Specific Segment from URL

I have showing the ad banners in .../openx/banner.php

Each Banner I had set the Banner Link.

After clicking the Banners the Page is redirected with the following URL.

.../openx/www/delivery/ck.php?oaparams=2__bannerid=1__zoneid=1__cb=5b97a864fe__oadest=http%3A%2F%2Fwww.google.com

Here is the root URL : openx/

I want to remove the last segment that is oadest=http%3A%2F%2Fwww.google.com when the page is loaded.

Please anyone help me...

Thanks...

Assuming this string is always at the end of your url, try putting this in the appropriate place on your .htaccess file:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*)oadset=(.*)$
RewriteRule ^/?ck\.php$ /ck.php?%1 [L]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM