The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/printthread.php 16 require_once



UserSpice
Login from subfolder goes to root and fail - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: Login from subfolder goes to root and fail (/showthread.php?tid=445)



Login from subfolder goes to root and fail - brille_b - 02-01-2017

Hi

When I log in from http://domain.tld/folder/users/login.php
I am redirected to http://domain.tld/users/account.php
which give a server error 500 since the folder /users does not exist in the root of the domain but in the folder /folder.

I seems to be logged in though since I can simply add "/folder" to the address : http://domain.tld/folder/users/account.php

UserSpice 4.2 - PHP 5.6.6 - MySQL 5.0.11


Login from subfolder goes to root and fail - mudmin - 02-01-2017

You can go into usersc/scripts/custom_login_script.php and put whatever url you want in there. Hope that helps.


Login from subfolder goes to root and fail - brille_b - 02-01-2017

Perfect.

I changed

Redirect::to('../../users/account.php');

to

Redirect::to('/folder/users/account.php');

and now I am redirected to something which is not an error message plus I learned how to set where to go after login which will soon come in handy.

Nice. Thanx.



Login from subfolder goes to root and fail - mudmin - 02-01-2017

Awesome! Glad it worked. One other fun thing is that when you're redirecting, you can do
Redirect::to('http://yourpage.com?err=Your+message+here!');

And it will flash that message on the screen after the redirect, which is great for carrying error and success messages across redirects.