S
S
Sasha19902017-07-11 11:33:37
htaccess
Sasha1990, 2017-07-11 11:33:37

Why doesn't redirect requests work in WAMP server using .htaccess file?

I am implementing MVC in PHP, in the NETBEANS environment, the task is to configure the server in such a way that all requests are redirected to the index.php file, rewrite_module is enabled, .htaccess is placed in the project directory.
The contents of .htaccess are as follows: AddDefaultCharset utf-8
RewriteEngine on
RewriteBase /Practika/
RewriteRule ^(.*) $ index.php
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
EverOne, 2017-07-11
@Sasha1990

This htaccess in the root of the site

RewriteEngine On
RewriteRule ^(.*)$ /praktika/$1

Such htaccess in the Praktika folder
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?$1 [L,QSA]

PS / I recommend watching this series of videos , this issue is discussed in the first or second lesson.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question