Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

never heard of the redirect function does it work for you ? #4

Closed
wants to merge 1 commit into from
Closed

never heard of the redirect function does it work for you ? #4

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 7, 2013

the redirect function didn't work for me

the redirect function didn't work for me
@nitriques
Copy link
Member

Yes redirect() is a method in Symphony's core. See http://getsymphony.com/learn/api/2.3.1/boot/functions/#redirect

It is a lot better than simply header("Location: $url");

This plugin only provides an EVENT. Please be sure to ATTACH the event for EACH AND EVERY page you want redirection. It can be only the index or event all pages. I normally use it on all pages except ajax and other apis pages.

@nitriques nitriques closed this Feb 8, 2013
@ghost
Copy link
Author

ghost commented Feb 8, 2013

i'm still going to have to dig out why it doesn't work on my site (maybe the server)
thanks for the link !

@ghost
Copy link
Author

ghost commented Feb 8, 2013

redirect($root.$new_url); works for me !

@nitriques
Copy link
Member

What's your PHP and Apache version ?

And just to be clear, redirect($root.$new_url); works, but not redirect($new_url); ?

@ghost
Copy link
Author

ghost commented Feb 14, 2013

Yes exactly, redirect($root.$new_url); works, but not redirect($new_url);
PHP Version 5.2.17
Apache ver. 2.2.19 (Unix)

Copy pasted from my webhost

@nitriques
Copy link
Member

This is really weird. But I will add it.

@ghost ghost assigned nitriques Feb 14, 2013
@nitriques
Copy link
Member

Where did you find the $root variable ? It is never declared in the event class...

@ghost
Copy link
Author

ghost commented Feb 14, 2013

sorry, I still have this line $root=Frontend::Page()->_param['root'];

@nitriques
Copy link
Member

Ah ! Ok ! I will add it tomorrow.

@nitriques
Copy link
Member

Sorry that tomorrow has been a month... But it's now there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants