- Joined
- Mar 6, 2023
- Messages
- 1
- Points
- 1
I am trying to create a React website and get it hosted. I've built the website and it works fine on LocalHost:3000, however, problems arise when I try to host it. I've used commands such as
I've attached a picture here showing the error on the right and my public_html folder where I unzipped the build file:
Contents of public_html directory
public_html directory
Nothing seems to be working and my website is simply showing error 403.
A few more random pieces of information:
npm run build
as well as yarn run build
(hoping that it would change something, it didn't.). Additionally, I pasted the following code in my .htaccess file:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
</IfModule>
Contents of public_html directory
public_html directory
Nothing seems to be working and my website is simply showing error 403.
A few more random pieces of information:
- My domain/website works fine as I was able to run a WordPress website on it beforehand with no issues
- I'm using the "Premium Web Hosting" from Hostinger
- I've made my website using React as well as NextUi