0
votes

I have deployed react application on the subfolder of apache server

Url Folder: /var/www/html/abc

I have the following .htaccess rules to rewrite requests

RewriteEngine On 
RewriteBase /abc
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /abc/index.html [L]

But it is not working Please help me to rewrite the .htaccess rules

1

1 Answers

0
votes

Just remove the abc on and place it in the directory:

# To be inside the /Directory
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
</IfModule>

Source: https://gist.github.com/santthosh/7dabf08fa3859361ef1e