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



UserSpice
/userc redirects not working - 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: /userc redirects not working (/showthread.php?tid=135)



/userc redirects not working - lefox - 05-20-2016

On the Alpha 3 build I have noticed that the /userc redirects to your page, but needs the init.php to come with it in order to still function properly.

Following the example provided I moved the account.php in the /userc.

Code:
<?php require_once 'init.php'; ?>

Warning: require_once(init.php): failed to open stream: No such file or directory in MyComputer\usersc\account.php on line 21




/userc redirects not working - mudmin - 05-20-2016

I will definitely look into that. My question is...did you move account.php or copy account.php? The original file still needs to be there. The error makes me think you copied it, but I'm just checking!


/userc redirects not working - brian - 05-20-2016

The redirect not working is easy and simply a documentation lacking on our part. init.php always needs to be "updated" to point to the correct path, since it is considered the anchor. Once the script knows where init.php is, then it can take over and a user can use $abs_us_root and/or $us_url_root as needed.

For a file placed in usersc/ you will need to update the init.php line to read:

Code:
<?php require_once '../users/init.php'; ?>

That instructs it to step back one level (to your userspice root), then move to the users/ folder and finally find the init.php file. This should get you straightened out.


/userc redirects not working - lefox - 05-20-2016

I copied account.php into the userc folder. After trying Brian's fix it worked like charm! Thank you for the quick reply.


/userc redirects not working - brian - 05-20-2016

Awesome. Thanks for posting.