I checked many other similar questions but I can’t come up with a .htaccess rule that would work properly.
I have a server containing a Knowledgebase system (knowledgebase.php). I don’t want to show this knowledgebase.php
in the URL, ever.
Examples what I want:
-
https://help.thecrypto.app should show same url (now it shows https://help.thecrypto.app/knowledgebase.php when you visit)
-
https://help.thecrypto.app/knowledgebase.php?article=1 should show URL https://help.thecrypto.app/?article=1
How can I do this?
I tried many options, including this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /knowledgebase.php?/$1 [L]
2
Answers
Could you please try following, written based on your shown samples. Please clear your browser cache before testing urls.
You can use this :
This will serve
/knowledgebase.php
if you visit your site hompage/
.