i have a problem it in the direction in URLs ..
i create me new URL in xampp
pro_mvc.com
and i want to write in .htaccess this code
<IfModule mod_rewrite.c>
Options -Multiviews
RewriteEngine On
RewriteBase /mvc_pro/public
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]
</IfModule>
and i have public inside the mvc_pro in my htdocs is
C:xampphtdocsmvc_propublic
and i create my mvc_pro.com rather localhost in
C:WindowsSystem32driversetchosts
with this code
127.0.0.1 mvc_pro.com
and in apache code is in
C:xamppapacheconfextrahttpd-vhosts.conf
have
<VirtualHost *:80>
DocumentRoot "C:xampphtdocsmvc_pro"
ServerName mvc_pro.com
</VirtualHost>
if i want to write any thing after mvc_pro.com/public like mvc_pro.com/public/qwjleqweuqwe he not turn me to index.php ” and i have this file in my path ” why he tell me
Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
mvc_pro.com
Apache/2.4.34 (Win32) OpenSSL/1.1.0i PHP/7.2.10
thanks again !
2
Answers
in :
just remove
AllowOverride
directive is used to allow the use of.htaccess
within the web server to allow overriding of the Apache config.mod_rewrite
is enabled inhttpd.conf
. For XAMPP, it should be enabledby default.
AllowOverride All
inhttpd-vhosts.conf
for the document root directoryYour VirtualHost config should look like this: