0

I have an application developed by reactjs and php laravel.

I want to deploy deploy this in a shared hosting with each subfolders not submitted domain.

Example Folder Structure:

ReactApp -> /ReactApp/

Laravel -> /Laravel/

Now,

If I open www.example.com it should be directed to /ReactApp/ folder

If I open www.example.com/api/ it should be redirected to /Laravel/ folder.

How can I achieve this using htaccess.

I don't want to use subdomain here since I don't have SSL for subdomains.

asked May 28, 2024 at 19:17
1
  • Do you already have a .htaccess inside /ReactApp/ and /Laravel subdirectories? Commented May 29, 2024 at 7:46

1 Answer 1

-4

Redirecting a domain to a subfolder based on the URL path can be done using server-side configuration files such as .htaccess for Apache servers, or using server configurations for Nginx servers.

answered May 28, 2024 at 20:51
Sign up to request clarification or add additional context in comments.

1 Comment

Do you know commands for the redirect. I'm looking for it.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.