Re: Mod_Rewrite problem...
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 -~--~~~~--~~--~--~---
Re: Mod_Rewrite problem...
Jonathan // Im sure that the directory is my local cakephp. But the wierd thing is that with http://localhost/ i get a 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. francky06l // The following actions give the following results: http://localhost/ : Directory listing for the /app/webroot folder http://locahost/index.php : The main CakePHP page saying my temp dir is writeable and my db connection is OK. http://locahost/app/index.php : The main CakePHP page saying my temp dir is writeable and my db connection is OK. On 7 jul, 23:27, francky06l [EMAIL PROTECTED] wrote: What append if you do localhost/app/index.php ? On Jul 7, 10:28 pm, Jonathan Snook [EMAIL PROTECTED] wrote: Are you sure you're hitting the local PHP install and not the local IIS install? with the index.php file in webroot, it'd be unlikely to get a directory listing. On Mon, Jul 7, 2008 at 4:07 PM, Hitsugaya [EMAIL PROTECTED] wrote: Hello all, im a new CakePHP user. Im setting up for my first project, but im running into some trouble with mod_rewrite. Now for the problemwhen i use:http://localhost/iget a list of the files from: C:/Program Files/Apache Group/Apache2/htdocs/cakePHP/app/webroot/ If mod_rewrite was configured the right way i should be directed stright to index.php...right?- 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 -~--~~~~--~~--~--~---
Re: Mod_Rewrite problem...
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/i get a 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 - --~--~-~--~~~---~--~~ 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: Mod_Rewrite problem...
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 hit http://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 hit http://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/iget a 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 - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mod_Rewrite problem...
Hello all, im a new CakePHP user. Im setting up for my first project, but im running into some trouble with mod_rewrite. Now for the problemwhen i use: http://localhost/ i get a list of the files from: C:/Program Files/Apache Group/Apache2/htdocs/cakePHP/app/webroot/ If mod_rewrite was configured the right way i should be directed stright to index.php...right? I have checked google, this google group and the CakePHP official docs been trying for some hours now with no result. Im running my CakePHP on a Windows Server 2003 virtual machine. Web server apache 2.0.63 and php 5.2.6 with the newest version of cake(1.2.0.7296). My apache config file (i have LoadModule rewrite_module modules/ mod_rewrite.so loaded): DocumentRoot C:/Program Files/Apache Group/Apache2/htdocs/cakePHP Directory C:/Program Files/Apache Group/Apache2/htdocs/cakePHP Options Indexes MultiViews FollowSymLinks # override required for the cake supplied .htaccess files to work AllowOverride All Order allow,deny Allow from all /Directory phpinfo says that mod_rewrite is enabled. My CakePHP implemtation is located in: - C:/Program Files/Apache Group/Apache2/htdocs/cakePHP I kept the normal folder structure, so my application to be will be located in: - C:/Program Files/Apache Group/Apache2/htdocs/cakePHP/app/webroot/ I kept my .htaccess files as they come with the fresh copy of cakePHP. I hope you guys can direct a new user like me in the right direction. Thanks in advance! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---