0

I would like to use .htacces for hiding the .php extension in address bar, I found the solution HERE, but this does not work for me. My .htacces in root looks like this:

RewriteEngine on 

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.php -f 
RewriteRule ^(.*)$ $1.php

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}\.html -f 
RewriteRule ^(.*)$ $1.html [L]

If I click on a link, it shows *.com/stg/xy.php I originally would like to show just *.com, but I read, that is not a good option because of visitors, so I would be satisfied with *.com/stg/xy/

FYI: I also have another .htacceses in subfolders because of pwd protection. Should I put the same code in all of them?

I also have *.pdf files to open, I want to hide the extension, or path here too.

Thanks, D

Community
  • 1
  • 1

1 Answers1

0

I think, I will use different folders with index.php and I will embed every single pdf file and use the method, mentioned above. I find this the best option in my case, because non of the "normal" methods work for me!