Re: Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js
I know, but still you can do that and use .htaccess. I do that in my development server at home On Thursday, December 18, 2014 6:44:02 PM UTC+2, glk wrote: > > Sorry HK, but the docs show that Apache's DocumentRoot should be set the > webroot folder! > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js
Hmm... that's what I get for editing out the REAL domain name which ended with "t". Please note: The Virtual Host definition I included (without the "t") works perfectly when mod_rewrite is used. I only included it thinking it would help alleveate questions about the setup I was running. <http://mydomain:8080/app/webroot/css/cake.generic.css> echo $this->Html->css('cake.generic.css'); The line of code above creates a link like this when using pretty urls: which is nowhere to be found on the server since the domain is pointing to the /app/webroot folder! The link using mod_rewrite, and it is the correct link even with pretty urls is: In the Html->css function, there is a call to $this->assetUrl which in turn calls $this->webroot($path) this->webroot($path) prefixes /css/cake.generic.css with the /app/webroot. If the href is altered to not include /app/webroot the that is created works fine! However, there is not way I've found to specify the Html->css() parameters that doesn't get altered to include /app/webroot By the way, is there a way to EDIT a previous post so I could correct the "t"? My problem comes when the two changes specified in the documentation are used to setup pretty urls instead of using mod_rewrite. On Thursday, December 18, 2014 11:49:50 AM UTC-7, John Andersen wrote: > > Check the DocumentRoot statement - you have a "t" too much "mydomaint" > should "mydomain" > The same in your Enjoy, John > > On Wednesday, 17 December 2014 23:52:35 UTC+2, glk wrote: >> >> Thinking... I wanted to add the following info: >> >> >> ServerName mydomain >> ServerAlias mydomain.tld >> DocumentRoot "E:/mydomain/app/webroot" >> >> Options Indexes FollowSymLinks Includes ExecCGI >> AllowOverride All >> Order allow,deny >> Allow from all >> >> #ScriptAlias /cgi-bin/ "E:/mydomain/cgi-bin/" >> #CustomLog E:/mydomain/app/webroot/log/mydomain_access.log combined >> #ErrorLog E:/mydomain/app/webroot/log/mydomain_error.log >> LogLevel warn >> >> >> >> >> -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js
Check the DocumentRoot statement - you have a "t" too much "mydomaint" should "mydomain" The same in your > Thinking... I wanted to add the following info: > > > ServerName mydomain > ServerAlias mydomain.tld > DocumentRoot "E:/mydomaint/app/webroot" > > Options Indexes FollowSymLinks Includes ExecCGI > AllowOverride All > Order allow,deny > Allow from all > > #ScriptAlias /cgi-bin/ "E:/mydomain/cgi-bin/" > #CustomLog E:/mydomain/app/webroot/log/mydomain_access.log combined > #ErrorLog E:/mydomain/app/webroot/log/mydomain_error.log > LogLevel warn > > > > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js
Sorry HK, but the docs show that Apache's DocumentRoot should be set the webroot folder! >From the 2.x Docs under Installation: Production A production installation is a more flexible way to setup CakePHP. Using this method allows an entire domain to act as a single CakePHP application. This example will help you install CakePHP anywhere on your filesystem and make it available at http://www.example.com. Note that this installation may require the rights to change the DocumentRoot on Apache webservers. Unpack the contents of the CakePHP archive into a directory of your choice. For the purposes of this example, we assume you chose to install CakePHP into /cake_install. Your production setup will look like this on the filesystem: /cake_install/ app/ webroot/ (this directory is set as the ``DocumentRoot`` directive) lib/ plugins/ vendors/ .htaccess index.php README Developers using Apache should set the DocumentRoot directive for the domain to: DocumentRoot /cake_install/app/webroot If your web server is configured correctly, you should now find your CakePHP application accessible at http://www.example.com. Thanks for looking into my problem, HK Greg -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js
Shouldn't DocumentRoot "E:/mydomaint/app/webroot" be something like: DocumentRoot "E:/mydomaint" ?? On Wednesday, December 17, 2014 11:52:35 PM UTC+2, glk wrote: > > Thinking... I wanted to add the following info: > > > ServerName mydomain > ServerAlias mydomain.tld > DocumentRoot "E:/mydomaint/app/webroot" > > Options Indexes FollowSymLinks Includes ExecCGI > AllowOverride All > Order allow,deny > Allow from all > > #ScriptAlias /cgi-bin/ "E:/mydomain/cgi-bin/" > #CustomLog E:/mydomain/app/webroot/log/mydomain_access.log combined > #ErrorLog E:/mydomain/app/webroot/log/mydomain_error.log > LogLevel warn > > > > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js
Thinking... I wanted to add the following info: ServerName mydomain ServerAlias mydomain.tld DocumentRoot "E:/mydomaint/app/webroot" Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all #ScriptAlias /cgi-bin/ "E:/mydomain/cgi-bin/" #CustomLog E:/mydomain/app/webroot/log/mydomain_access.log combined #ErrorLog E:/mydomain/app/webroot/log/mydomain_error.log LogLevel warn -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Not allowed use mod_rewrite... Trying to get pretty urls to work... No css or js
I have a working "site" on my development machine that uses mod_rewrite. However, I'm informed that I will not be able to deploy the site with mod_rewrite... so the docs say: App.baseUrl If you don’t want or can’t get mod_rewrite (or some other compatible module) up and running on your server, you’ll need to use CakePHP’s built-in pretty URLs. In /app/Config/core.php, uncomment the line that looks like: Configure::write('App.baseUrl', env('SCRIPT_NAME')); Also remove these .htaccess files: /.htaccess/app/.htaccess/app/webroot/.htaccess This will make your URLs look like www.example.com/index.php/controllername/actionname/param rather than www.example.com/controllername/actionname/param. If you are installing CakePHP on a webserver besides Apache, you can find instructions for getting URL rewriting working for other servers under the *URL Rewriting* <http://book.cakephp.org/2.0/en/installation/url-rewriting.html> section. Those are the ONLY changes specified in the docs! Now the following code in my default.ctp: echo $this->Html->css('cake.generic.css'); $scriptOptions = array('once' => true); echo $this->Html->script('jquery/1.9/jquery-1.9.1.js', $scriptOptions); Produces errors: "NetworkError: 404 Not Found - http://mydomain:8080/app/webroot/css/cake.generic.css"; "NetworkError: 404 Not Found - http://mydomain:8080/app/webroot/js/jquery/1.9/jquery-1.9.1.js"; The actual location of the file: E:\mydomain\app\webroot\css So there has to be something more to do... I did NOT remove the loading of mod_rewrite on this machine, but there are NO .htaccess files within the domain! Thanks for any assistance, Greg -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.
Re: Pretty URLs
On Tuesday, 5 June 2012 13:17:39 UTC+2, Florin Trifu wrote: > > Can someone please help me with the questions I've asked in the email > bellow? > You are talking about routes http://book.cakephp.org/2.0/en/development/routing.html AD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pretty URLs
Can someone please help me with the questions I've asked in the email bellow? Thank you in advance! Sent via BlackBerry from Vodafone Romania -Original Message- From: Florin Trifu Sender: cake-php@googlegroups.com Date: Mon, 4 Jun 2012 05:51:19 To: Reply-To: cake-php@googlegroups.com Subject: Pretty URLs Hi In my application, if I want to access a link, the url in the browser will be something like http://application/controller/action/parameter:value. However, browsing on cakephp.org the urls are something like (and I will give you an example): http://book.cakephp.org/2.0/en/installation/advanced-installation.html. I want my urls to look the same way, with that ending in .html, and that format like browsing directories. I would also want to show different names for the controllers and for the actions, I want them in my language and not in English. How can I do that? Are those pretty urls described on this page: http://book.cakephp.org/2.0/en/installation/advanced-installation.html? Thank you in advance! Best regards! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Pretty URLs
Hi In my application, if I want to access a link, the url in the browser will be something like http://application/controller/action/parameter:value. However, browsing on cakephp.org the urls are something like (and I will give you an example): http://book.cakephp.org/2.0/en/installation/advanced-installation.html. I want my urls to look the same way, with that ending in .html, and that format like browsing directories. I would also want to show different names for the controllers and for the actions, I want them in my language and not in English. How can I do that? Are those pretty urls described on this page: http://book.cakephp.org/2.0/en/installation/advanced-installation.html? Thank you in advance! Best regards! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: pretty urls :)
nevermind, routing.php did the trick. 2011/9/1 Ricardo > Hi, > > I wonder how to do, in order to get my url look like > > > www.mysite.com/mode/1290132 > > and not > > www.mysite.com/mode/index/1290132 > > thanks for the help :) > > -- cccaf... -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
pretty urls :)
Hi, I wonder how to do, in order to get my url look like www.mysite.com/mode/1290132 and not www.mysite.com/mode/index/1290132 thanks for the help :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pretty URLs and Lighttpd
More important - why are you trying to use lua scripts for lighthttpd when you seem to be working on a MAMP install? (apache) On Mar 21, 4:08 am, AD7six wrote: > On Mar 21, 1:27 am, axel9641 wrote: > > > Hi Folks > > I am new to CakePHP. I am going through the > > manual:http://book.cakephp.org/view/918/Pretty-URLs-and-Lighttpd > > where is explained that in order to use Pretty URLs in cakephp, we > > have to place a lua script in / > > etc/lighttpd/cake. > > But the big question is : Whereabouts in my project am I supposed to > > place it??? > > lua scripts are not part of your project - they are part of your > lighttpd config. > > magnet.attract-physical-path-to = ( "/etc/lighttpd/cake.lua" ) > > That says "load this lua script" and tells you an example of where it > is supposed to be - you can put it anywhere you like but I repeat: it > is part of your lighttpd config, not part of _a_ project. > > AD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pretty URLs and Lighttpd
On Mar 21, 1:27 am, axel9641 wrote: > Hi Folks > I am new to CakePHP. I am going through the > manual:http://book.cakephp.org/view/918/Pretty-URLs-and-Lighttpd > where is explained that in order to use Pretty URLs in cakephp, we > have to place a lua script in / > etc/lighttpd/cake. > But the big question is : Whereabouts in my project am I supposed to > place it??? lua scripts are not part of your project - they are part of your lighttpd config. magnet.attract-physical-path-to = ( "/etc/lighttpd/cake.lua" ) That says "load this lua script" and tells you an example of where it is supposed to be - you can put it anywhere you like but I repeat: it is part of your lighttpd config, not part of _a_ project. AD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Pretty URLs and Lighttpd
Hi Folks I am new to CakePHP. I am going through the manual: http://book.cakephp.org/view/918/Pretty-URLs-and-Lighttpd where is explained that in order to use Pretty URLs in cakephp, we have to place a lua script in / etc/lighttpd/cake. But the big question is : Whereabouts in my project am I supposed to place it??? P:S: I have installed it under c:\wamp\www\cake_1_3 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Re: Pretty URLs don't work without .htaccess ?
On Wednesday, January 27, 2010, Miles J wrote: > Yes .htaccess is required because its uses mod_rewrite. If you didn't > your URLs would be like so: > > index.php?url=/items/view/ > > On Jan 27, 1:18 pm, Johnny Cupcake wrote: >> This issue was last discussed here in 2006, as far as I can tell. I'd >> like to know if anything has changed since then. >> >> Are pretty URLs available without using .htaccess? For example, with >> my Apache document root set to my app's webroot dir, a controller >> "items" and an action "view", and scaffolding on, I would expect >> something to be available athttp://myserver.com/items/view. But it >> is not; the result is a 404 error message. >> >> IOW, the example given in the book (http://book.cakephp.org/view/105/ >> Scaffolding) doesn't work. >> >> It DOES work if I tryhttp://myserver.com/index.php/items/view >> instead, but that isn't a very pretty URL. So I wonder, is there >> anything I can do short of turning on .htaccess, to make the clean/ >> pretty URLs available? Using Cake v1.2.5, that is. Thanks. > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com for more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- Stefano Salvatori M. http://stefano.salvatori.cl/ Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
Some web hosting companies do not allow the use of htaccess on shared servers, and sometimes they allow you to use it on linux machines not windows! I think Marcelo has the right answer for this kind of situation Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
On Jan 29, 8:55 am, AD7six wrote: > On Jan 29, 3:35 am, Johnny Cupcake wrote: > > > Why did I disable mod_rewrite in the first place? Well, the core > > config file says pretty URLs are available regardless (see line 48), > > so I figured I'd keep complexity to a minimum. > > I think you misunderstood the comment, it is not saying you can > simulate mod_rewrite with cake > > /controller/action = with mod rewrite and what all the docs will refer > to, > /index.php/controller/action = "pretty" url > > AD PS it's so uncommon for someone to need to do this nowadays I also followed your lead in mixing up the terminology, sorry about that. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
On Jan 29, 3:35 am, Johnny Cupcake wrote: > Why did I disable mod_rewrite in the first place? Well, the core > config file says pretty URLs are available regardless (see line 48), > so I figured I'd keep complexity to a minimum. I think you misunderstood the comment, it is not saying you can simulate mod_rewrite with cake /controller/action = with mod rewrite and what all the docs will refer to, /index.php/controller/action = "pretty" url AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
Why did I disable mod_rewrite in the first place? Well, the core config file says pretty URLs are available regardless (see line 48), so I figured I'd keep complexity to a minimum. Having re-enabled mod_rewrite, both the problems I listed above are resolved. On Jan 28, 4:24 pm, AD7six wrote: > On 28 ene, 23:49, Johnny Cupcake wrote: > > > Right, I was referring to mod_rewrite and not .htaccess in > > particular. > > > I see the links generated by HtmlHelper are wrong too. They point to > > "/app/webroot/filename" when Apache's root is already set to "/app/ > > webroot/", so they ought to therefore point to "/filename". At this > > point I am only guessing the bug is related to not using > > mod_rewrite?! I see nothing in the docs about reconfiguring > > HtmlHelper's base directory, and I followed the instructions in the > > core app config file to no avail. > > > I'm going to re-enable mod_rewrite and just pray all these problems > > disappear. > > Any path problems inevitably stem from having your config badly > defined. > > "Are pretty URLs available without using .htaccess?" yes > "Are pretty URLs available without using mod_rewrite on apache?" no > > Did you disable mod_rewrite for a reason? You can't achieve pretty > urls without mod_rewrite or equivalent, and asking how to get pretty > urls while actively preventing the possibility is a bit confusing. > > AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
On Wed, Jan 27, 2010 at 9:34 PM, Miles J wrote: > Yes .htaccess is required because its uses mod_rewrite. If you didn't > your URLs would be like so: > > index.php?url=/items/view/ If you uncomment App.baseUrl in core, you can get URLs like index.php/items/view/. Atts. -- MARCELO F ANDRADE Belem, Amazonia, Brazil "I took the red pill" Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
On 28 ene, 23:49, Johnny Cupcake wrote: > Right, I was referring to mod_rewrite and not .htaccess in > particular. > > I see the links generated by HtmlHelper are wrong too. They point to > "/app/webroot/filename" when Apache's root is already set to "/app/ > webroot/", so they ought to therefore point to "/filename". At this > point I am only guessing the bug is related to not using > mod_rewrite?! I see nothing in the docs about reconfiguring > HtmlHelper's base directory, and I followed the instructions in the > core app config file to no avail. > > I'm going to re-enable mod_rewrite and just pray all these problems > disappear. Any path problems inevitably stem from having your config badly defined. "Are pretty URLs available without using .htaccess?" yes "Are pretty URLs available without using mod_rewrite on apache?" no Did you disable mod_rewrite for a reason? You can't achieve pretty urls without mod_rewrite or equivalent, and asking how to get pretty urls while actively preventing the possibility is a bit confusing. AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
Right, I was referring to mod_rewrite and not .htaccess in particular. I see the links generated by HtmlHelper are wrong too. They point to "/app/webroot/filename" when Apache's root is already set to "/app/ webroot/", so they ought to therefore point to "/filename". At this point I am only guessing the bug is related to not using mod_rewrite?! I see nothing in the docs about reconfiguring HtmlHelper's base directory, and I followed the instructions in the core app config file to no avail. I'm going to re-enable mod_rewrite and just pray all these problems disappear. On Jan 27, 4:34 pm, Miles J wrote: > Yes .htaccess is required because its uses mod_rewrite. If you didn't > your URLs would be like so: > > index.php?url=/items/view/ > > On Jan 27, 1:18 pm, Johnny Cupcake wrote: > > > This issue was last discussed here in 2006, as far as I can tell. I'd > > like to know if anything has changed since then. > > > Are pretty URLs available without using .htaccess? For example, with > > my Apache document root set to my app's webroot dir, a controller > > "items" and an action "view", and scaffolding on, I would expect > > something to be available athttp://myserver.com/items/view. But it > > is not; the result is a 404 error message. > > > IOW, the example given in the book (http://book.cakephp.org/view/105/ > > Scaffolding) doesn't work. > > > It DOES work if I tryhttp://myserver.com/index.php/items/view > > instead, but that isn't a very pretty URL. So I wonder, is there > > anything I can do short of turning on .htaccess, to make the clean/ > > pretty URLs available? Using Cake v1.2.5, that is. Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Pretty URLs don't work without .htaccess ?
Yes .htaccess is required because its uses mod_rewrite. If you didn't your URLs would be like so: index.php?url=/items/view/ On Jan 27, 1:18 pm, Johnny Cupcake wrote: > This issue was last discussed here in 2006, as far as I can tell. I'd > like to know if anything has changed since then. > > Are pretty URLs available without using .htaccess? For example, with > my Apache document root set to my app's webroot dir, a controller > "items" and an action "view", and scaffolding on, I would expect > something to be available athttp://myserver.com/items/view. But it > is not; the result is a 404 error message. > > IOW, the example given in the book (http://book.cakephp.org/view/105/ > Scaffolding) doesn't work. > > It DOES work if I tryhttp://myserver.com/index.php/items/view > instead, but that isn't a very pretty URL. So I wonder, is there > anything I can do short of turning on .htaccess, to make the clean/ > pretty URLs available? Using Cake v1.2.5, that is. Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Pretty URLs don't work without .htaccess ?
This issue was last discussed here in 2006, as far as I can tell. I'd like to know if anything has changed since then. Are pretty URLs available without using .htaccess? For example, with my Apache document root set to my app's webroot dir, a controller "items" and an action "view", and scaffolding on, I would expect something to be available at http://myserver.com/items/view . But it is not; the result is a 404 error message. IOW, the example given in the book (http://book.cakephp.org/view/105/ Scaffolding) doesn't work. It DOES work if I try http://myserver.com/index.php/items/view instead, but that isn't a very pretty URL. So I wonder, is there anything I can do short of turning on .htaccess, to make the clean/ pretty URLs available? Using Cake v1.2.5, that is. Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: pagination, "pretty" URLs, and route
You must add one of the following at the begining of your router.php configuration file in order to use the 'page' parameter in url and get your url parsed by the router. This comment come from the Router class itself: * Do not parse any named parameters: * {{{ Router::connectNamed(false); }}} * * Parse only default parameters used for CakePHP's pagination: * {{{ Router::connectNamed(false, array('default' => true)); }}} * * Parse only the page parameter if its value is a number: * {{{ Router::connectNamed(array('page' => '[\d]+'), array('default' => false, 'greedy' => false)); }}} * * Parse only the page parameter no mater what. * {{{ Router::connectNamed(array('page'), array('default' => false, 'greedy' => false)); }}} * * Parse only the page parameter if the current action is 'index'. * {{{ Router::connectNamed(array('page' => array('action' => 'index')), array('default' => false, 'greedy' => false)); }}} * * Parse only the page parameter if the current action is 'index' and the controller is 'pages'. * {{{ Router::connectNamed(array('page' => array('action' => 'index', 'controller' => 'pages')), array('default' => false, 'greedy' => false)); }}} * -- View this message in context: http://old.nabble.com/pagination%2C-%22pretty%22-URLs%2C-and-route-tp15798189p26490049.html Sent from the CakePHP mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-...@googlegroups.com. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/cake-php?hl=en.
Re: Using Pretty URLs on Windows
I'm not sure if this is the answer you are looking for, but I highly recommend Isapi Rewrite if you are using IIS on windows: http://www.helicontech.com/isapi_rewrite/ Version 3 supports .htaccess on Windows nearly identical to Apache. Version 2 can work using the instructions here, see comments too: http://bakery.cakephp.org/articles/view/clean-urls-with-isapi-rewrite-on-iis. I've found the free versions to be more work than purchasing the full edition of version 3. If this doesn't answer your question, search around for Isapi rewrite modules. On Sep 30, 7:32 am, Kamran Hameed wrote: > Folks i am new to CakePHP. I am going through the manual which assumes > that the user is on Linux Or Unix System. I want to ask one question > > http://book.cakephp.org/view/782/Lighttpd-and-mod_magnetLINK says > that in order to use Pretty URLs in cakephp, place this lua script in / > etc/lighttpd/cake. > > /// Script > > Where am i supposed to place it on windows... ?? > > P:S: I have installed it under c:\wamp\www\cake... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Using Pretty URLs on Windows
Folks i am new to CakePHP. I am going through the manual which assumes that the user is on Linux Or Unix System. I want to ask one question http://book.cakephp.org/view/782/Lighttpd-and-mod_magnet LINK says that in order to use Pretty URLs in cakephp, place this lua script in / etc/lighttpd/cake. /// Script Where am i supposed to place it on windows... ?? P:S: I have installed it under c:\wamp\www\cake... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Configure CakePHP not to use Pretty Urls
config.core.php - line 59(ish) 2009/1/28 PaulMan > > Hello everybody, > Is there a way to configure CakePHP NOT to use Pretty Urls? > I'm using the latest version. > > Best Regards > PM > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Configure CakePHP not to use Pretty Urls
Hello everybody, Is there a way to configure CakePHP NOT to use Pretty Urls? I'm using the latest version. Best Regards PM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pretty urls not working
Hi again, I've installed the 1.2 version, since the 1.1 was not working fine without mod_rewrite. With 1.2, I get to the page I want by doing: http://www.mysite.com/index.php?url=controller/action But I think Cake is handling the URLs in a different way internally. When I try to use the add form http://www.mysite.com/index.php?url=controller/add it redirects to http://www.mysite.com/index.php/controller/action which throws a: No input file specified and no record is saved. Any clues? Thanks! On Fri, May 16, 2008 at 1:33 PM, Marcos Aruj <[EMAIL PROTECTED]> wrote: > Anyone? :( > Or does any body has deployed cake php on a godaddy hosting? Any steps to > follow? Things to check? > Thanks again. > > > On Fri, May 16, 2008 at 9:48 AM, Marcos Aruj <[EMAIL PROTECTED]> > wrote: > >> Thanks fot the suggestion. With no slash ( >> http://www.mysite.com/index.php?url=surveys/index) I get this: >> CakePHP Rapid Development >> Missing controller >> >> You are seeing this error because controller *Controller* could not be >> found. >> >> *Notice:* If you want to customize this error message, create >> app/views/errors/missing_controller.thtml. >> >> *Fatal*: Create the class below in file : app/controllers/controller.php >> > class Controller extends AppController { >>var $name = ''; >> } >> ?> >> >> ** >> It's not parsing the controller name at all.. :( >> Any other suggestion? Thanks for helping ;) >> >> On Fri, May 16, 2008 at 5:14 AM, Esoteric <[EMAIL PROTECTED]> >> wrote: >> >>> >>> Try: >>> www.mysite.com/index.php?url=controller/action (no slash before >>> controller) >>> >>> Let us know. >>> -Erik >>> >>> On May 15, 6:44 pm, Markitusss <[EMAIL PROTECTED]> wrote: >>> > Hi all, >>> > >>> > I've been trying to run cake on a godaddy hosting service. mod_rewrite >>> > is not available, so I set up cake to use its Pretty URLs, by >>> > uncommenting the line inside core.php and by deleting .htaccess files. >>> > I got the index page to perfectly, with CSS styling and connection to >>> > the database, but I can't access controllers/actions. I get a 404 not >>> > found. I tried >>> > >>> > >>> www.mysite.com/index.php/controller/actionandwww.mysite.com/index.php?url=/controller/actionwithno >>> success. >>> > >>> > On my computer, everything works fine with mod_rewrite, but I can' >>> > make it to work on the server. Is it something special with godaddy, >>> > or am I missing some other settings. Please help. >>> > >>> > I also tried this fix:https://trac.cakephp.org/ticket/812 >>> > >>> > 1. The URL's need to contain the extra '?'. In app/config/core.php >>> > [line 42] you will have uncommented this line for no mod_rewrite. >>> > Change it to: >>> > >>> > define('BASE_URL',env('SCRIPT_NAME') . '?'); >>> > >>> > 2. Need to extract the controller/view differently. Index.php (line >>> > 68) currently reads: >>> > >>> > $uri = setUri(); >>> > >>> > Change this line to: >>> > >>> > $uri = env('PHP_SELF') . env('QUERY_STRING'); >>> > >>> > but no luck... >>> > >>> > Thanks in advance, >>> > >>> > Best regards, >>> > >>> > Marcos >>> >>> >>> >> >> >> -- >> Marcos Aruj Alvarez >> Ingeniero de Software >> --- >> [EMAIL PROTECTED] >> - > > > > > -- > Marcos Aruj Alvarez > Ingeniero de Software > --- > [EMAIL PROTECTED] > - > -- Marcos Aruj Alvarez Ingeniero de Software --- [EMAIL PROTECTED] - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty urls not working
Anyone? :( Or does any body has deployed cake php on a godaddy hosting? Any steps to follow? Things to check? Thanks again. On Fri, May 16, 2008 at 9:48 AM, Marcos Aruj <[EMAIL PROTECTED]> wrote: > Thanks fot the suggestion. With no slash ( > http://www.mysite.com/index.php?url=surveys/index) I get this: > CakePHP Rapid Development > Missing controller > > You are seeing this error because controller *Controller* could not be > found. > > *Notice:* If you want to customize this error message, create > app/views/errors/missing_controller.thtml. > > *Fatal*: Create the class below in file : app/controllers/controller.php > class Controller extends AppController { >var $name = ''; > } > ?> > > ** > It's not parsing the controller name at all.. :( > Any other suggestion? Thanks for helping ;) > > On Fri, May 16, 2008 at 5:14 AM, Esoteric <[EMAIL PROTECTED]> > wrote: > >> >> Try: >> www.mysite.com/index.php?url=controller/action (no slash before >> controller) >> >> Let us know. >> -Erik >> >> On May 15, 6:44 pm, Markitusss <[EMAIL PROTECTED]> wrote: >> > Hi all, >> > >> > I've been trying to run cake on a godaddy hosting service. mod_rewrite >> > is not available, so I set up cake to use its Pretty URLs, by >> > uncommenting the line inside core.php and by deleting .htaccess files. >> > I got the index page to perfectly, with CSS styling and connection to >> > the database, but I can't access controllers/actions. I get a 404 not >> > found. I tried >> > >> > >> www.mysite.com/index.php/controller/actionandwww.mysite.com/index.php?url=/controller/actionwithno >> success. >> > >> > On my computer, everything works fine with mod_rewrite, but I can' >> > make it to work on the server. Is it something special with godaddy, >> > or am I missing some other settings. Please help. >> > >> > I also tried this fix:https://trac.cakephp.org/ticket/812 >> > >> > 1. The URL's need to contain the extra '?'. In app/config/core.php >> > [line 42] you will have uncommented this line for no mod_rewrite. >> > Change it to: >> > >> > define('BASE_URL',env('SCRIPT_NAME') . '?'); >> > >> > 2. Need to extract the controller/view differently. Index.php (line >> > 68) currently reads: >> > >> > $uri = setUri(); >> > >> > Change this line to: >> > >> > $uri = env('PHP_SELF') . env('QUERY_STRING'); >> > >> > but no luck... >> > >> > Thanks in advance, >> > >> > Best regards, >> > >> > Marcos >> >> >> > > > -- > Marcos Aruj Alvarez > Ingeniero de Software > --- > [EMAIL PROTECTED] > - -- Marcos Aruj Alvarez Ingeniero de Software --- [EMAIL PROTECTED] - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty urls not working
Thanks fot the suggestion. With no slash ( http://www.mysite.com/index.php?url=surveys/index) I get this: CakePHP Rapid Development Missing controller You are seeing this error because controller *Controller* could not be found. *Notice:* If you want to customize this error message, create app/views/errors/missing_controller.thtml. *Fatal*: Create the class below in file : app/controllers/controller.php ** It's not parsing the controller name at all.. :( Any other suggestion? Thanks for helping ;) On Fri, May 16, 2008 at 5:14 AM, Esoteric <[EMAIL PROTECTED]> wrote: > > Try: > www.mysite.com/index.php?url=controller/action (no slash before > controller) > > Let us know. > -Erik > > On May 15, 6:44 pm, Markitusss <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > I've been trying to run cake on a godaddy hosting service. mod_rewrite > > is not available, so I set up cake to use its Pretty URLs, by > > uncommenting the line inside core.php and by deleting .htaccess files. > > I got the index page to perfectly, with CSS styling and connection to > > the database, but I can't access controllers/actions. I get a 404 not > > found. I tried > > > > > www.mysite.com/index.php/controller/actionandwww.mysite.com/index.php?url=/controller/actionwithno > success. > > > > On my computer, everything works fine with mod_rewrite, but I can' > > make it to work on the server. Is it something special with godaddy, > > or am I missing some other settings. Please help. > > > > I also tried this fix:https://trac.cakephp.org/ticket/812 > > > > 1. The URL's need to contain the extra '?'. In app/config/core.php > > [line 42] you will have uncommented this line for no mod_rewrite. > > Change it to: > > > > define('BASE_URL',env('SCRIPT_NAME') . '?'); > > > > 2. Need to extract the controller/view differently. Index.php (line > > 68) currently reads: > > > > $uri = setUri(); > > > > Change this line to: > > > > $uri = env('PHP_SELF') . env('QUERY_STRING'); > > > > but no luck... > > > > Thanks in advance, > > > > Best regards, > > > > Marcos > > > -- Marcos Aruj Alvarez Ingeniero de Software --- [EMAIL PROTECTED] - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty urls not working
Try: www.mysite.com/index.php?url=controller/action (no slash before controller) Let us know. -Erik On May 15, 6:44 pm, Markitusss <[EMAIL PROTECTED]> wrote: > Hi all, > > I've been trying to run cake on a godaddy hosting service. mod_rewrite > is not available, so I set up cake to use its Pretty URLs, by > uncommenting the line inside core.php and by deleting .htaccess files. > I got the index page to perfectly, with CSS styling and connection to > the database, but I can't access controllers/actions. I get a 404 not > found. I tried > > www.mysite.com/index.php/controller/actionandwww.mysite.com/index.php?url=/controller/actionwith > no success. > > On my computer, everything works fine with mod_rewrite, but I can' > make it to work on the server. Is it something special with godaddy, > or am I missing some other settings. Please help. > > I also tried this fix:https://trac.cakephp.org/ticket/812 > > 1. The URL's need to contain the extra '?'. In app/config/core.php > [line 42] you will have uncommented this line for no mod_rewrite. > Change it to: > > define('BASE_URL',env('SCRIPT_NAME') . '?'); > > 2. Need to extract the controller/view differently. Index.php (line > 68) currently reads: > > $uri = setUri(); > > Change this line to: > > $uri = env('PHP_SELF') . env('QUERY_STRING'); > > but no luck... > > Thanks in advance, > > Best regards, > > Marcos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~--~~~~--~~--~--~---
Pretty urls not working
Hi all, I've been trying to run cake on a godaddy hosting service. mod_rewrite is not available, so I set up cake to use its Pretty URLs, by uncommenting the line inside core.php and by deleting .htaccess files. I got the index page to perfectly, with CSS styling and connection to the database, but I can't access controllers/actions. I get a 404 not found. I tried www.mysite.com/index.php/controller/action and www.mysite.com/index.php?url=/controller/action with no success. On my computer, everything works fine with mod_rewrite, but I can' make it to work on the server. Is it something special with godaddy, or am I missing some other settings. Please help. I also tried this fix: https://trac.cakephp.org/ticket/812 1. The URL's need to contain the extra '?'. In app/config/core.php [line 42] you will have uncommented this line for no mod_rewrite. Change it to: define('BASE_URL',env('SCRIPT_NAME') . '?'); 2. Need to extract the controller/view differently. Index.php (line 68) currently reads: $uri = setUri(); Change this line to: $uri = env('PHP_SELF') . env('QUERY_STRING'); but no luck... Thanks in advance, Best regards, Marcos --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty URLs
What does your $form->create() line look like? You're getting: form action="/index.php/users/login" which doesn't look right. Although, you said you've removed htacess files--why is that? On Fri, Mar 7, 2008 at 9:00 AM, jam <[EMAIL PROTECTED]> wrote: > > Cannot get the pretty urls to work. I have removed the htaccess files, > and uncommented the BASE_URL in core.php but hopeless. Cant even get > the un-pretty urls to work. The url populates with the referes page > contoller and function. Please check > http://www.ubiview.eu/index.php/users/login/ > and press "enter". The Url has the "/users/login" twice instead of > once. The code behind that is only a "redirect(/users/login)". Any > help much appreciated. THanks > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Pretty URLs
Cannot get the pretty urls to work. I have removed the htaccess files, and uncommented the BASE_URL in core.php but hopeless. Cant even get the un-pretty urls to work. The url populates with the referes page contoller and function. Please check http://www.ubiview.eu/index.php/users/login/ and press "enter". The Url has the "/users/login" twice instead of once. The code behind that is only a "redirect(/users/login)". Any help much appreciated. THanks --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: pagination, "pretty" URLs, and route
Right, I do know the difference between passedArgs & params; I was getting mixed up because I'd been trying all sorts of combinations. I'll ditch the component and try the built-in. I'm not exactly sure why I wasn't using that in the first place. thanks On Mon, Mar 3, 2008 at 6:24 AM, AD7six <[EMAIL PROTECTED]> wrote: > > > > On Mar 3, 7:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > I'm using Andy's PaginationComponent in an admin action. The first > > page loads fine but something's wrong with the route that's causing an > > error. Here's the setup: > > > > ($page and $show would be set from $this->params or a default) > > > > $criteria = null; > > $parameters = array('page' => $page); > > $options = array( > > 'url' => '/admin/events/', > > 'sortByClass' => 'Event', > > 'sortBy' => 'date_from', > > 'direction' => 'DESC', > > 'show' => $show, > > 'maxPages' => 10, > > 'paramStyle' => 'pretty', > > 'paramSeparator' => ':' > > ); > > list($order, $limit, $page) = $this->Pagination->init($criteria, > > $parameters, $options); > > > > So, the links for the other pages are rendered like: > > > > /admin/events/page:3 > > pretty params means /param/val/param2/val2 you want named params style > but if you are using 1.2 you don't want to use that component at all - > use the pagination that comes with cake. > > note that > /admin/events/page:3 > is not the same to the router as > /admin/events/index/page:3 > > hth, > > AD > > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: pagination, "pretty" URLs, and route
On Mar 3, 7:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm using Andy's PaginationComponent in an admin action. The first > page loads fine but something's wrong with the route that's causing an > error. Here's the setup: > > ($page and $show would be set from $this->params or a default) > > $criteria = null; > $parameters = array('page' => $page); > $options = array( > 'url' => '/admin/events/', > 'sortByClass' => 'Event', > 'sortBy' => 'date_from', > 'direction' => 'DESC', > 'show' => $show, > 'maxPages' => 10, > 'paramStyle' => 'pretty', > 'paramSeparator' => ':' > ); > list($order, $limit, $page) = $this->Pagination->init($criteria, > $parameters, $options); > > So, the links for the other pages are rendered like: > > /admin/events/page:3 pretty params means /param/val/param2/val2 you want named params style but if you are using 1.2 you don't want to use that component at all - use the pagination that comes with cake. note that /admin/events/page:3 is not the same to the router as /admin/events/index/page:3 hth, AD --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
pagination, "pretty" URLs, and route
I'm using Andy's PaginationComponent in an admin action. The first page loads fine but something's wrong with the route that's causing an error. Here's the setup: ($page and $show would be set from $this->params or a default) $criteria = null; $parameters = array('page' => $page); $options = array( 'url' => '/admin/events/', 'sortByClass' => 'Event', 'sortBy' => 'date_from', 'direction' => 'DESC', 'show' => $show, 'maxPages' => 10, 'paramStyle' => 'pretty', 'paramSeparator' => ':' ); list($order, $limit, $page) = $this->Pagination->init($criteria, $parameters, $options); So, the links for the other pages are rendered like: /admin/events/page:3 The result, though, is this error: The action admin_page3 is not defined in controller EventsController For some reason, the colon is disappearing (Sanitize?) and the action is misidentified. I've tried all kinds of different routes (and removed it altogether) with no luck. How do i configure a route to handle a URL with "pretty" params with colons such as these? It seems to me that a colon would interfere with the way routes work, but this is what I see in the examples. I had originally been using '/' as the separator and the following route and URL: Router::connect('/events/page/:page', array('controller' => 'events', 'action' => 'index'), array('page' => '[0-9]+') ); /admin/events/page/3 But that gives me: The action admin_page is not defined in controller EventsController If I prepend '/admin' to the route path I see the default, non-admin index view. So, I'd be happy to use either '/' or ':' as the separator, but where am I going wrong? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty URLs Output Problem
My mistake, I should have looked a little harder in the threads! On Jun 4, 2:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello bakers, > > I am moving an application from my testing server to a production > server > and mod_rewrite seemed to be acting funny (wasn't finding the CSS > file, > looking for files in the wrong place), so I switched to using the > cakeprettyURLs. This solved the CSS problem, but for instance, when > logging > into the app, I get a 404 because the path that is create appends the > file > location that it should be looking for to the top level folder plus > the > index.php file like so: > > /top_level_directory/index.php/controller/action) > > I have edited the ROOT definition properly in both the top_level > index > document and the webroot index document with the full path to the app > directory. > > I did remove the .htaccess files from the proper directories as well > when > activating cake'sprettyurls. > > My app is in a subdirectory of the domain. > > I am not quite sure where to look next, does any one recognize how > cake > might be outputing my paths like the above? > > Thanks, > theperk --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Pretty URLs Output Problem
Hello bakers, I am moving an application from my testing server to a production server and mod_rewrite seemed to be acting funny (wasn't finding the CSS file, looking for files in the wrong place), so I switched to using the cake pretty URLs. This solved the CSS problem, but for instance, when logging into the app, I get a 404 because the path that is create appends the file location that it should be looking for to the top level folder plus the index.php file like so: /top_level_directory/index.php/controller/action) I have edited the ROOT definition properly in both the top_level index document and the webroot index document with the full path to the app directory. I did remove the .htaccess files from the proper directories as well when activating cake's pretty urls. My app is in a subdirectory of the domain. I am not quite sure where to look next, does any one recognize how cake might be outputing my paths like the above? Thanks, theperk --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty URLs: advice needed!
Use http://bakery.cakephp.org/articles/view/slug-behavior as a start... HTH Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = On 4/30/07, TM <[EMAIL PROTECTED]> wrote: > > Let me clear a bit more, for the first link "accounting" is the > category of a post titled (or URL taged as) "accounting-overview-ACCA" > > Any luck with such URLs with Cake > Cheers! > TM > > > > > On Apr 29, 4:52 pm, TM <[EMAIL PROTECTED]> wrote: > > Hi there, > > > > I am wondering how we can achieve such pretty URLs below with > > CakePHP... > > > > 1-www.mydomain.com/accounting/accounting-overview-ACCA.html > > 2-www.mydomain.com/accounting/ledger-details.html > > 3-www.mydomain.com/accounting/how-to-make-double-entry-system.html > > 4-www.mydomain.com/services/accounting/softwares/payroll/excellent-syst... > > > > Any suggestions would be appreciated the most. > > Looking forward to hearing from you. > > > > Take care, > > TM > > > > > --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty URLs: advice needed!
Let me clear a bit more, for the first link "accounting" is the category of a post titled (or URL taged as) "accounting-overview-ACCA" Any luck with such URLs with Cake Cheers! TM On Apr 29, 4:52 pm, TM <[EMAIL PROTECTED]> wrote: > Hi there, > > I am wondering how we can achieve such pretty URLs below with > CakePHP... > > 1-www.mydomain.com/accounting/accounting-overview-ACCA.html > 2-www.mydomain.com/accounting/ledger-details.html > 3-www.mydomain.com/accounting/how-to-make-double-entry-system.html > 4-www.mydomain.com/services/accounting/softwares/payroll/excellent-syst... > > Any suggestions would be appreciated the most. > Looking forward to hearing from you. > > Take care, > TM --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Pretty URLs: advice needed!
Hi there, I am wondering how we can achieve such pretty URLs below with CakePHP... 1- www.mydomain.com/accounting/accounting-overview-ACCA.html 2- www.mydomain.com/accounting/ledger-details.html 3- www.mydomain.com/accounting/how-to-make-double-entry-system.html 4- www.mydomain.com/services/accounting/softwares/payroll/excellent-systems.html Any suggestions would be appreciated the most. Looking forward to hearing from you. Take care, TM --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Pretty URLs Develpoment Installation Problem
I got mod_rewrite turned on, so the links above don't help solve the problem. I'd still like to know if anyone has seen the /cgi-php/phpwrapper thing before, though... --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Pretty URLs Develpoment Installation Problem
I'm trying to get a development install up and running on a shared server (No mod_rewrite or access to the httpd.conf file), but am having problems with: define ('BASE_URL', env('SCRIPT_NAME')); This line in the core.php file, which usually allows me to run a development install when there is no mod_rewrite, seems to be pointing to the wrong place. The first page opens up fine: http://www.hughesac.com/cake ...but the links point to the totally wrong folder: http://www.hughesac.com/cgi-php/phpwrapper/controllername/actionname What's more, when I manually type in the "Pretty URL" of the action I want to test (i.e. http://www.hughesac.com/cake/index.php/products/glossary ), it pops a "No Input File Specified" error. Any ideas on what's wrong and/or how I can get it up and running? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---