I have this htaccess filecontent:
Options +FollowSymLinks RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^admin/([a-zA-Z]+)/?([a-zA-Z0-9/]*)$ public/admin/index.php?page=$1&query=$2 [L] RewriteRule ^([a-zA-Z]+)/?([a-zA-Z0-9/]*)$ public/index.php?page=$1&query=$2 [L]
And now I'm trying to do a session-specific redirection, very simple stuff. I have a controller with this function:
protected function redirect($url) { header("Location: http://localhost:8888/myproject/" . $url, true); exit(); }
ClientController, which extends the controller, has a page function
private function user_page() { $this->redirect("homepage");
I tried different ways to record the location path, for example
Location: localhost:8888/myproject/" . $url, Location: /myproject/" . $url,
Now, after reading all the posts in stackoverflow, I see that none of these solutions worked for me.
Edit: a solution to this can be seen on header redirection in Location not working
source share