Hello,
under "adminster" -> "Site-information" i defined my "Front Page" - my front-page call "node/home".

Now - when a user login from the "real" front-page (www.domain.com/) - the redirect after login is to www.domain.com/node/home .... this i dont need - the user must redirect to www.domain.com/ and not to www.domain.com/node/home

Can anyone help me what php-code i must use for "Login Destination" to make the redirect to the "real" front-page after login?

Sorry for my bad english - i hope you understand my problem.

Regards
Matthias

Comments

4ud’s picture

@Matthias,
@all,

I have the same problem. Did you find a solution?

Regards, 4u

Khalor’s picture

Login Destination respects the <front> token when using PHP snippet mode

So under 'Destination URL settings', set the type to 'PHP snippet' and use the following:

return '<front>';

Works for me.

Berliner-dupe’s picture

@4ud

Or install "Global Redirect" - when you call domain.com/node/content (your setting homepage) you will automaticly redirect to domain.com/

bryanzera’s picture

Using return "<front>" does not work for me, inasmuch as it redirects me to the path of the homepage ('content/homepage'), not the root of the site.

Berliner-dupe’s picture

Install Module -> "Global Redirect" ... this fix this problem.

avinash_thombre’s picture

Issue summary: View changes

Check .htaccess, apache_custom.conf file, settings.php file for any re-direction code present. Comment it or create proper exception for that. Also, check for the global redirect, redirect modules and configure it properly.

In my case, local setup /user was re-directing to home page. I found this code in apache_custom.conf file.

#Redirecting non-www to www
#RewriteCond %{HTTP_HOST} ^site\.com [NC]
#RewriteRule ^(.*)$ https://www.site.com%{REQUEST_URI} [L,R=301]

Commenting this code for time being helped access the /user. Make sure the re-directs are properly placed for live environment. Hope this helps.