• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

Unable to remove public from the url in shared cpanel hosting.

General Discussion
2
3
289
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I
    isachin last edited by 27 Aug 2024, 11:06

    Hi,
    I've created a project at https://example.com/bagisto/
    in the /bagisto/.htaccess and /bagisto/public/.htaccess I added the below snippet

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

    but still, the public folder is showing in the URL as https://example.com/bagisto/public instead https://example.com/bagisto/

    Am I missing anything?

    1 Reply Last reply Reply Quote 0
    • Rishabh-Webkul
      Rishabh-Webkul last edited by 28 Aug 2024, 09:24

      Hello @Sachin-0

      To know in detail about how to redirect the public to the main domain you can through the below video.

      Link - https://www.youtube.com/watch?v=OoUQQMu_ArU&t=10s

      Thanks & Regards

      1 Reply Last reply Reply Quote 0
      • I
        isachin last edited by 28 Aug 2024, 20:08

        Hi @Rishabh-Webkul

        This works fine in localhost and while developing but the issue came when I was updated in my cpanel hosting. I've installed it through the Softaculous installer in Cpanel.

        I have attempted to use several .htaccess rules including the default one for Laravel that sends requests to 'public'. Unfortunately, it resulted in 403 or 404 errors as well. However, usually, it should work fine.

        Therefore, I assume that the '/public' route exists in the code of the application, which causes this error.

        it would be great If you could help in any way.

        Thanks.

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post