How to remove htaccess redirect to public folder

Asked

Viewed 286 times

0

The settings of my htaccess to force the SSL this way as follows:

# NA PASTA RAIZ

Options -Indexes

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

# NA PASTA PUBLIC

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R,L]

more when will do SSL redirect the url comes the following

https://www.meusite.com/public

or

https://www.meusite.com/public/index.php

Does anyone know how to solve this for the folder public and index.php not show up at the url?

  • if I’m not mistaken you need to use RewriteBase /public/ or so RewriteBase /public

  • worse than not , already try so and gave the same thing :/

  • I think this helps you: https://stackoverflow.com/questions/18973058/how-to-remove-folder-name-from-url-using-htaccess

  • is Hebert de Lima worked out no, the hosting settings I’m using is pretty stiff and does not let change much

  • #SOLVED # remove public/ folder from redirect Rewritecond %{THE_REQUEST} s/+(.+/)? public/( S*) [NC] Rewriterule /%1%2? [R=301,L,NE]

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.