hide php extension in url
Options +MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
hide php extension in url
Options +MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
how to hide get parameters in url php
function strip_param_from_url( $url, $param ) {
$base_url = strtok($url, '?'); // Get the base url
$parsed_url = parse_url($url); // Parse it
$query = $parsed_url['query']; // Get the query string
parse_str( $query, $parameters ); // Convert Parameters into array
unset( $parameters[$param] ); // Delete the one you want
$new_query = http_build_query($parameters); // Rebuilt query string
return $base_url.'?'.$new_query; // Finally url is ready
}
// Usage
echo strip_param_from_url( 'http://url.com/search/?location=london&page_number=1',
'location' )
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us