How do I display the same file in Apache in all cases?

Asked 1 years ago, Updated 1 years ago, 300 views

How do I view the same file in Apache in all cases?

Example:
Show localhost/index.php index.php
View localhost/hoge index.php
↑ I want it to look like this

ubuntu apache

2022-12-27 07:07

1 Answers

I think .htaccess, which I do on laravel, will be helpful.
Specifically, the following areas are affected, so please try them.

#Send Requests To Front Controller...
RewriteCon%{REQUEST_FILENAME}!-d
US>RewriteCon%{REQUEST_FILENAME}!-f
RewriteRule^index.php[L]

Description


2022-12-27 08:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.