xpde Posted February 28, 2018 Share Posted February 28, 2018 Since people wanted to complain about this stuff, why not just remake it in a language they might understand more fluently. This code snippet will destroy of your pesky GET parameter (?i=[1-100]). Here's how to do so - Create the Document Go into your FTP and create a file (preferably ~ deleteGET.php) Copy and paste this code into the document <?php // Just simply add your own GET parameters to remove. $toRemove = array( 'i' => '', 'anotherGetParam' => '' ); $removeParam = array_intersect_key( $toRemove, $_GET ); // Stabilize website / avoid loop if(sizeof( $removeParam ) > 0 ) { $redirectUrl = $_SERVER[ 'REQUEST_URI' ]; // Server Request foreach( $removeParam as $key => $val ) $redirectUrl = preg_replace( '/([?&])' . $key . '=[^&]+(&|$)/', '$1', $redirectUrl ); // Removes every parameter set in $toRemove header( 'Location: ' . $redirectUrl ); // Redirects you to final size } ?> Include the document go into your whatever document you want (typically your index.php) Copy and paste this code to the top of the page <?php include 'deleteGET.php'; // Change to the directory and filename of your code. ?> Vwolla! Now you can use Ads, WordPress, and ETC. without having to deal with all the GET Parameters getting deleted/hidden. Quote Link to comment Share on other sites More sharing options...
xpde Posted March 3, 2018 Author Share Posted March 3, 2018 On 3/1/2018 at 1:17 AM, PlanetCloud said: Also the word deleteGET.php could easily get missunderstood (I know we can change this but just a comment).... You should make it delete-the-i-thingy.php No. I personally disagree with your opinion. Quote Link to comment Share on other sites More sharing options...
Ramboj686 Posted April 9, 2018 Share Posted April 9, 2018 On 2/28/2018 at 6:51 PM, xpde said: Since people wanted to complain about this stuff, why not just remake it in a language they might understand more fluently. This code snippet will destroy of your pesky GET parameter (?i=[1-100]). Here's how to do so - Create the Document Go into your FTP and create a file (preferably ~ deleteGET.php) Copy and paste this code into the document <?php // Just simply add your own GET parameters to remove. $toRemove = array( 'i' => '', 'anotherGetParam' => '' ); $removeParam = array_intersect_key( $toRemove, $_GET ); // Stabilize website / avoid loop if(sizeof( $removeParam ) > 0 ) { $redirectUrl = $_SERVER[ 'REQUEST_URI' ]; // Server Request foreach( $removeParam as $key => $val ) $redirectUrl = preg_replace( '/([?&])' . $key . '=[^&]+(&|$)/', '$1', $redirectUrl ); // Removes every parameter set in $toRemove header( 'Location: ' . $redirectUrl ); // Redirects you to final size } ?> Include the document go into your whatever document you want (typically your index.php) Copy and paste this code to the top of the page <?php include 'deleteGET.php'; // Change to the directory and filename of your code. ?> Vwolla! Now you can use Ads, WordPress, and ETC. without having to deal with all the GET Parameters getting deleted/hidden. Thanks Buddy. Quote Link to comment Share on other sites More sharing options...
Anyx Posted May 28, 2018 Share Posted May 28, 2018 Hello, there is a much simpler way to do that, without PHP or .htaccess code, as I posted it in another similar topic here. Follow my steps and you should be OK: Enable CloudFlare through vPanel or by changing Nameservers Select Full SSL/Flexible (NOT RECOMMENDED)/Full SSL Strict (IF YOU HAVE INSTALLED YOUR OWN CERTIFICATE) Wait for 1-24 hours It should be gone! Please tell me if this worked for you or if you found it helpful. Quote Link to comment Share on other sites More sharing options...
xpde Posted May 28, 2018 Author Share Posted May 28, 2018 2 hours ago, PCTipsGR said: Hello, there is a much simpler way to do that, without PHP or .htaccess code, as I posted it in another similar topic here. Follow my steps and you should be OK: Enable CloudFlare through vPanel or by changing Nameservers Select Full SSL/Flexible (NOT RECOMMENDED)/Full SSL Strict (IF YOU HAVE INSTALLED YOUR OWN CERTIFICATE) Wait for 1-24 hours It should be gone! Please tell me if this worked for you or if you found it helpful. If you enable cloudflare on your webhost, it will mess with the registration and make it unavailable for users to sign up. Quote Link to comment Share on other sites More sharing options...
Anyx Posted May 28, 2018 Share Posted May 28, 2018 23 minutes ago, xpde said: If you enable cloudflare on your webhost, it will mess with the registration and make it unavailable for users to sign up. What do you mean? I have contacted personally Support and they said that if you use securesignup.net as register domain instead of order.yourdomain.com it will work properly, and so it does! Quote Link to comment Share on other sites More sharing options...
xpde Posted May 28, 2018 Author Share Posted May 28, 2018 14 minutes ago, PCTipsGR said: What do you mean? I have contacted personally Support and they said that if you use securesignup.net as register domain instead of order.yourdomain.com it will work properly, and so it does! Tell that to the people who said otherwise Quote Link to comment Share on other sites More sharing options...
Anyx Posted May 28, 2018 Share Posted May 28, 2018 44 minutes ago, xpde said: Tell that to the people who said otherwise Who are these people? Quote Link to comment Share on other sites More sharing options...
Anyx Posted May 29, 2018 Share Posted May 29, 2018 1 hour ago, PlanetCloud said: Me It will break it, if you don't belive it, then try it! How does it break your site? All the traffic is going to be routed by Cloudflare (Since you must point your nameserver to cloudflare) and this means that if a new user signed up lets say user1.yourdomain.com, even after 72 hours, user will still get a DNS not found error. Why? Because whenever user access user1.yourdomain.com, cloudflare is going to check it's own DNS records and found none because you had to ADD IT MANUALLY every time a user signed up. This might sound easy but after a few days you will get sick of it. Why not use cloudflare API to do this? (You say) Well you need to put the subdomain name in the A record but you also need the IP address which is diffrent for most account. User 1 can have ip of 1.1.1.0 and user 2 can have 1.1.1.654.123 and so on (The IP is randomly assigned). Also you had to deal with server IP changes and you had to RECHECK all the previously signed up user A records for this... I mean, when you use the CloudFlare integration on vPanel. Quote Link to comment Share on other sites More sharing options...
AA22Dev Posted May 29, 2018 Share Posted May 29, 2018 6 hours ago, PlanetCloud said: Me It will break it, if you don't belive it, then try it! How does it break your site? All the traffic is going to be routed by Cloudflare (Since you must point your nameserver to cloudflare) and this means that if a new user signed up lets say user1.yourdomain.com, even after 72 hours, user will still get a DNS not found error. Why? Because whenever user access user1.yourdomain.com, cloudflare is going to check it's own DNS records and found none because you had to ADD IT MANUALLY every time a user signed up. This might sound easy but after a few days you will get sick of it. Why not use cloudflare API to do this? (You say) Well you need to put the subdomain name in the A record but you also need the IP address which is diffrent for most account. User 1 can have ip of 1.1.1.0 and user 2 can have 1.1.1.654.123 and so on (The IP is randomly assigned). Also you had to deal with server IP changes and you had to RECHECK all the previously signed up user A records for this... However, when you use the cloudflare from VPanel then you don't have to care about A Records. They will automatically pointed to ip when a new user signed up. It will not break your website in any way when you use it from VPanel. But default singup.php don't work under https (SSL) Quote Link to comment Share on other sites More sharing options...
Anyx Posted May 29, 2018 Share Posted May 29, 2018 2 hours ago, Aqib said: However, when you use the cloudflare from VPanel then you don't have to care about A Records. They will automatically pointed to ip when a new user signed up. It will not break your website in any way when you use it from VPanel. But default singup.php don't work under https (SSL) That's why you HAVE TO change order.yourdomain.com to securesignup.net! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.