Hey there, im been working on this problem for some time now and i
solved it. It turns out mod_rewrite was working properly from the
verry start accept somehow it is was not property sending me to the
CakePHP mainpage on http://localhost/, i still get the directory
listing.

But when i dit http://localhost/something i get a new page saying
missing somethingcontroller. So i figured...euh...it...it..it´s
working!! Only problem is that i got the directory listing. After some
googling and searching the apache conf i fount the following:
DirectoryIndex. entered index.php there and now all is working. Still
don´t quite know why that change was needed but im not complaining
since its working. Now i can finally start brushing up my PHP skills
and doing some coding.

I just thought i post the solution to support other starting people. I
wanna thank everybody posting in this thread for helping out, hope is
can return the favor sometime. Cheers!

On 8 jul, 19:37, Hitsugaya <[EMAIL PROTECTED]> wrote:
> I've been trying, yet again, to get mod_rewrite to work. Now i've gome
> accros something that is to me (begin a apache AND mod_rewrite noob)
> quite strange:
>
> I have the following file:
> C:/Program Files/Apache Group/Apache2/htdocs/cakePHP/app/
> webroot/.htaccess with the following content:
> <IfModule mod_rewrite.c>
>     RewriteEngine On
>     RewriteCond %{REQUEST_FILENAME} !-d
>     RewriteCond %{REQUEST_FILENAME} !-f
>     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> </IfModule>
> When i hithttp://localhost/i get a directory listing off: :/Program
> Files/Apache Group/Apache2/htdocs/cakePHP/app/webroot
> This i think means that mod_rewrite is not functioning correclty.
>
> BUT, now comes the crazy thing: when i change the file to:
>
> C:/Program Files/Apache Group/Apache2/htdocs/cakePHP/app/
> webroot/.htaccess with the following content:
> <IfModule mod_rewrite.c>
>     RewriteEngine On
>     RewriteCond %{REQUEST_FILENAME} !-d
>     RewriteCond %{REQUEST_FILENAME} !-f
>     RewriteRule ^silly\.html$ /exists.html [L]
>     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> </IfModule>
>
> I've added a second rewrite rule wich is a dummy rule (it makes
> absolutely no sense :P) BUT when i now hithttp://localhost/i get my
> CakePHP mainpage!!!
>
> That indicates that mod_rewrite now is working. However, with this
> little hack all images and styles dissapear. I googled it and i think
> a .htaccess file can only have one rewrite rule.
> Then howcome that the .htaccess file finally does what i needs to do
> when i add a second rewrite rule? I think that something is wrong with
> that file but i don't know what.
>
> Help would be GREATLY appriciated!
>
> On 8 jul, 14:38, Hitsugaya <[EMAIL PROTECTED]> wrote:
>
>
>
> > I think they are. Just to be sure...there are .htaccess files in:
>
> > C:/Program Files/Apache Group/Apache2/htdocs/cakePHP (the root folder
> > of cakePHP). Content:
> > <IfModule mod_rewrite.c>
> >    RewriteEngine on
> >    RewriteRule    ^$ app/webroot/    [L]
> >    RewriteRule    (.*) app/webroot/$1 [L]
> > </IfModule>
>
> > C:/Program Files/Apache Group/Apache2/htdocs/cakePHP/app. Content:
> > <IfModule mod_rewrite.c>
> >     RewriteEngine on
> >     RewriteRule    ^$    webroot/    [L]
> >     RewriteRule    (.*) webroot/$1    [L]
> >  </IfModule>
>
> > C:/Program Files/Apache Group/Apache2/htdocs/cakePHP/app/webroot
> > <IfModule mod_rewrite.c>
> >     RewriteEngine On
> >     RewriteCond %{REQUEST_FILENAME} !-d
> >     RewriteCond %{REQUEST_FILENAME} !-f
> >     RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
> > </IfModule>
>
> > All are left untouched, and the content seemes allright...
>
> > Tnx for the relpy´s so far guys, hope we can solve this issue!
>
> > On 8 jul, 13:44, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
>
> > > Did the .htaccess files get copied properly?
>
> > > > Jonathan // Im sure that the directory is my local cakephp. But the
> > > > wierd thing is that withhttp://localhost/igeta directory listing
> > > > and the index.php file is in that directory. That should point to
> > > > mod_rewrite not being enabled but when i fire up phpinfo it states
> > > > that mod_rewrite is one of the loaded modules.- Tekst uit 
> > > > oorspronkelijk bericht niet weergeven -
>
> > > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk 
> > > bericht niet weergeven -
>
> > - Tekst uit oorspronkelijk bericht weergeven -- Tekst uit oorspronkelijk 
> > bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to