Re: Help with URL logic and routes
i wonder also if i could make cake think that http://www.example.com/blogname/ was a plugin and then just reuse is for varying namesknow what i mean? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Help with URL logic and routes
thanks AD7six, im going to look into these methods today, foregoing subdomains i guess what i really want to accomplish is this: http://www.example.com/blogname/ - would use the blogs controller http://www.example.com/invalidblogname/ -returns error (no such blog) http://www.example.com/blogname/post-title-here/ - uses posts contoller http://www.example.com/login/ - displays login page http://www.example.com/blogname/add/ - add a post if youre logged in i guess ill try modifying the url in boostrap and see how that turns out. any other suggestions are still very welcomed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Help with URL logic and routes
Hi Joe, What other urls is your site going to have? If you are also going to have any other 'base' urls (http://www.example.com/about) and unknown usernames (which is assumed) then you will find it hard to create a route that will allow you to cater for your other controllers/pages as well as a username. How are you structuring the controller and method that will return the results for the example url? It may be easier to hijack the url in the bootstrap, and modify it if it matches a regex so that http://www.example.com/username/2006-5-7/post-title-goes-here/ becomes /controller/method/username/2006-5-7/post-title-goes-here/ and http://www.example.com/about is left as is. Or are you looking for something that will assume it is a username if it doesn´t match a pre-existing route? In this case you could create your own error controller and based on the url either requestAction (/controller/method/username/2006-5-7/post-title-goes-here/ ) or fall through to real error messages. HTH, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Help with URL logic and routes
I understand that this topic has been talked about before but i havent yet seen any thread that made me understand clearly how to accomplish what i wish. let me explain briefly: i am designing some blog software for users of my companies services. i am unable to use subdomains so i was looking to structure the URL as follows: http://www.example.com/username/ this would use the blog controller and point to some default front page...the part i cant seem to accomplish with routes so far is this http://www.example.com/username/2006-5-7/post-title-goes-here/ that would use the posts controller and display the post. i see that using bootstrap to hijack the URL is an option but im still not sure how to do it... any suggestions would be greatly welcomed --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---