Answer the question
In order to leave comments, you need to log in
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
This htaccess in the root of the site
RewriteEngine On
RewriteRule ^(.*)$ /praktika/$1
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?$1 [L,QSA]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question