A
A
Alexander2018-10-31 20:08:36
htaccess
Alexander, 2018-10-31 20:08:36

How to redirect to index on localhost?

There is such a code

RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php

But as I understand it, it is only on regular servers, because when I enter localhost: 63342/MVC/asdasda in the LAN,
it gives 404
How to implement such a connection?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2018-11-01
@shambler81

1. Don't get in the habit of developing locally, a local environment will still be different from a live *nix server.
Just make it a rule to develop on a remote machine so that you have phpstorm in your hands, GIT / ssh and so on and so forth.
2. use a real domain name by adding it to the .host file
3. logs to help you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question