Mod_Rewrite problem...

View: New views
10 Messages — Rating Filter:   Alert me  

Mod_Rewrite problem...

by Hitsugaya-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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 problem....when 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@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Jonathan Snook-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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 <Alexis.Drazen@...> 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 problem....when 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?
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by francky06l :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


What append if you do localhost/app/index.php ?


On Jul 7, 10:28 pm, "Jonathan Snook" <jonathan.sn...@...> 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 <Alexis.Dra...@...> 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 problem....when 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?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Hitsugaya-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Jonathan >> Im sure im hitting my CakePHPdirectory. Index.php and
test.php etc are all listed in the directory listing. That's what the
wierd thing is, with index.php in that folder getting a directory
listing is wierd.

franck >>
if i do : localhost >>i get a directory listing of my /cakePHP/app/
webroot/ folder
if i do :localhost/index.php >> Then i get the main cakePHP page
saying my temp, db etc are OK.
if i do :localhost/app/index.php >> Then i get the main cakePHP page
saying my temp, db etc are OK.
Euh...i don't get why localhost/index.php and localhost/app/index.php
are giving the same result.

 Tnx for the reply's so far! x

On 7 jul, 23:27, francky06l <franckl...@...> wrote:

> What append if you do localhost/app/index.php ?
>
> On Jul 7, 10:28 pm, "Jonathan Snook" <jonathan.sn...@...> 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 <Alexis.Dra...@...> 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 problem....when 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@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Hitsugaya-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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 <franckl...@...> wrote:

> What append if you do localhost/app/index.php ?
>
> On Jul 7, 10:28 pm, "Jonathan Snook" <jonathan.sn...@...> 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 <Alexis.Dra...@...> 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 problem....when 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@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Jonathan Snook-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Did the .htaccess files get copied properly?

> 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.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Hitsugaya-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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" <jonathan.sn...@...> 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@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Hitsugaya-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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 <Alexis.Dra...@...> 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" <jonathan.sn...@...> 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@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Hitsugaya-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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 <Alexis.Dra...@...> 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 <Alexis.Dra...@...> 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" <jonathan.sn...@...> 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@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Mod_Rewrite problem...

by Claudia-18 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Just for explanation - I think the following happened:

Your original htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
</IfModule>

This means that
- if the requested file is not a directory (RewriteCond %
{REQUEST_FILENAME} !-d)
- and if the requested file is not a file (RewriteCond %
{REQUEST_FILENAME} !-f)
- then apply the rewrite rule to send everything to htaccess
(RewriteRule ^(.*)$ index.php?url=$1 [QSA,L])

Problem:
The url 'localhost' maps to a directory for apache, so the rewrite
rule was never applied.

Then you added a silly rewrite rule to your htaccess:
<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>

A rewrite condition always applies just to the first rewrite rule that
comes after the condition(s),
so now the conditions were only applied to the silly rewrite rule.
That again means that everything was now directed to the index.php,
also your pictures and css files.

Now you added index.php as DirectoryIndex. This means that whenever
you supply a directory
without a filename in the url, apache looks for the file index.php in
this directory. So if you now request
http://localhost, the rewrite rule still will not apply, but as apache
uses the index.php anyway,  this does not matter.

When you request any cake url like http://localhost/foo, the rewrite
condition evaluates to true
(as the directory foo is neither a directory nor a file) and thus the
rewrite rule is applied.


Hope it helps you understand what was actually going on.

Claudia


On Jul 11, 3:05 pm, Hitsugaya <Alexis.Dra...@...> wrote:

> 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 onhttp://localhost/, i still get the directory
> listing.
>
> But when i dithttp://localhost/somethingi 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 <Alexis.Dra...@...> 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/iget 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/iget 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 <Alexis.Dra...@...> 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" <jonathan.sn...@...> 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/igetadirectory 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@...
To unsubscribe from this group, send email to cake-php-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price