Back

Problem with URL's - only "home page" route working on live


Igor posted 4 months ago

Hi guys, i need help with URLs on server...

example:

10.10.10.50/projectname/ -- work 10.10.10.50/login - dont work

10.10.10.50/projectname/login - work

The main problem is, if I click something on the page, for example ‘login’ it’s directed 10.10.10.50/login, instead of 10.10.10.50/projectname/login

In httpd.conf file i allowoverrired all:

<Directory />
Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted
</Directory>

this is my htaccess file:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>     Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ / [L,R=301]
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/ [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|images)/(.*)$ public// [L,NC]
</IfModule```


Thanks
Aiden Andrews-McDermott replied 3 months ago

Please, can you post your views code it may not be Apache doing it unless we have an all-round view of each component it's very difficult to diagnose?

Igor replied 3 months ago

I solved the problem ... In the localhost links works ok, example: <a href=/login> , but over the remote server this slash line deletes the folder name (name of aplication). So i put it all links {{url('something')}} and now it's ok ... thanks anyway ;)


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us