0

I have set up this website and it's working perfectly, however, extensions such as domain.com/dashboard will display a 404 but when I add .PHP at the back -> domain.com/dashboard.php it displays. Is there a way to make all the files display correctly without me adding .PHP at the end of each URL?

Thanks

9
  • Please provide your server configuration. Commented Aug 1, 2022 at 6:14
  • Using the basic namecheap shared hosting with php7.4 as default Commented Aug 1, 2022 at 6:18
  • Please provide your actual configuration files, especially your rewrite rules. Commented Aug 1, 2022 at 6:20
  • I actually got to this to work. There was no .htaccess file so I created one and then added the following lines of code: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] Commented Aug 1, 2022 at 6:27
  • So, we can close this question as a duplicate to serverfault.com/questions/392821/… Commented Aug 1, 2022 at 6:32

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.