0

I have made configuration on /etc/httpd/conf/httpd.conf to allow .htaccess

AllowOverride None => AllowOverride All

This is my .htacess file in my /var/www/html/

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ abc/public/$1 [L]
</IfModule>

This is my .htaccess file in /var/www/html/abc/public

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On
RewriteBase /abc/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

When i am opening xxxxxxx.com, it will redirect me to public directories.

/var/www/html/abc/public

It will display all the folder inside public but does not execute the index.php inside the public folder.

When i tried to acess the login page by xxxxxx.com/login, it prompted me to download the index.php file. enter image description here

When i tried to open a php file, it doesn't execute the code. It is displaying the code as text instead of execute it.

How can i solve this issue? I have no idea what's wrong is going on, appreciate if someone might help me out. Thanks.

Crazy
  • 847
  • 1
  • 18
  • 41

0 Answers0