Thursday, January 28, 2010

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 <mileswjohn...@gmail.com> 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 <sparklew...@hotmail.com> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: