I have problem with URL in Laravel 5.2
If I type the url directly to the browser, it works fine. However, if I hyperlink the url, it reduces the url and returns to another link.
For example:
firstsite.com/juliet/tasks will become firstsite.com/tasks when I click on a hyperlink.
Here are my .htaccess file under Laravel root folder (not public folder):
<IfModule mod_rewrite.c>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Please help!
It works when I try the absolute url:
<a href="http://firstsite.com/juliet/tasks"><div class="btn btn-warning">Back</div></a>
This one doesn't work although when I hover the mouse to the button, it does show the correct hyperlink which is firstsite.com/juliet/tasks:
<a href="/juliet/tasks"><div class="btn btn-warning">Back</div></a>