We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Create a default route and the effect on seo?

I want to create a default route. When someone comes on to / or /index they should be sent to auth/index By default how can i achieve this? While not impacting seo? Thanks



16.4k

You mean redirect to /auth/index?

You want to redirect to auth/index for ever or only if user not logged in?

for these cases have different solutions. please answer this question first so I can tell you the best solution.



5.7k

Hi

Basically i am creating a store where the user needs to login so when they access the site at

Eg https://mydomain.com/ Or https://mydomain.com/index They should be taken to :

https://mydomain.com/auth/index If the user is logged or once successfully logged in they will be redirected to:

https://mydomain.com/store/index I know I can just use redirects but I wanted to check if there is a better way of achieving this without affecting seo .

Thanks



10.5k
Accepted
answer
edited Mar '15

In this case the better solution is using ACL functionality.

I have a custom/complete/complicated solution at my own library Tartan that I can help you to setup in your project easily but there is another simple implementation at Vokuro App

by-the-way before using any component you should have a background of ACL that I suggest you to google it or read Phalcon ACL Doc



3.5k

What do you mean with "without affecting seo"? As far as i know the url "/" itself has no special meaning for Google & CO. (Asuming you provide a sitemap and/or have incoming links somewhere. )

If you want static content (only for Robots) on "/", i'd use a javascript redirect on that page. But this page would not be ranked very heigh, because of the short (not existing) "length of stay" of visitors on that page.



5.7k

Thanks Aboozar that library was extremely helpful.