I have installed Laravel on VPS hosting.
It is installed in the /phptube folder on the root of my account.
To avoid using the path for the home page, which is
mypage.com/phptube/public,
I have created an .htaccess file that looks like:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /phptube/public/
# Remove public from URL
RewriteCond %{REQUEST_URI} !^/phptube/public/
RewriteRule ^(.*)$ /phptube/public/ [L]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
all work perfectly
sve dobro funkcionise i za neku od sledecih adresa
mypage.com/en-uk,
mypage.com/en-uk/blog,
mypage.com/en-uk/blog/category/news, ili
mypage.com/en-uk/blog/category/news/post/unlock-the-power-of-programing
but
if I add / (trailing slash an the end of url) at the end of that address, all url addresses are redirected or changed
for example
mypage.com/en-uk/
redirect to
mypage.com/phptube/public/en-uk
mypage.com/en-uk/blog/
redirect to
mypage.com/phptube/public/en-uk/blog
mypage.com/en-uk/blog/category/news/
redirect to
mypage.com/en-uk/phptube/public/blog/category/news
mypage.com/en-uk/blog/category/news/post/unlock-the-power-of-programing
redirect to
mypage.com/en-uk/phptube/public/blog/category/news/post/unlock-the-power-of-programing
How to fix that, or prevent this redirection ?
Thank you