Here is my page
xyz.com?show=page
Inside my index.php the code will be like
<?php
echo $_GET['show']
?>
But i want users to type only xyz.com/page and it should automatically append ?show in url
How can i do this ?
I have .htaccess like
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
But it removes only the last part of page i.e., .php
How can i do this
If
index.phpwill be handling all your requests, you need to rewrite themindex.php. What you're doing now is rewriting them to the current request and adding a.phpat the end.This should do what you want: