0

When the user visits my site, the URL displayed is http://example.com.

How do I automatically add /index.php to the end of the URL to make it http://example.com/index.php?

0

2 Answers 2

2

Use DirectoryIndexRedirect directive

DirectoryIndexRedirect on
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for responding. That gives me Internal Server Error
Perhaps your apache version is bellow 2.4
0

You could try something like this:

RewriteEngine On
RewriteRule ^/$ http://%{HTTP_HOST}/index.php [R=301,L]

But why would you want that?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.