Hi :)

I got Cake with mod_rewrite working on 1und1 servers (the german branch...)
with a little change to the .htaccess in webroot:

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

Please note the slash before index.php

Hope this helps

Heiner



> thanks - I am certain this can be made to happen
> 
> a different format of error 404 this time. A bit plainer than before, their
> usual error 404 has a load of adverts on it
> 
> perhaps making that line less specific? I dunno how that could be done.
> 
> maybe {yeah I am not fully ofay with mod rewrite}
> (.*) -> catches everything can this line be made more specific?
> 
> 
> 
> On 09/02/07, [EMAIL PROTECTED] <
> [EMAIL PROTECTED]> wrote:
>> 
>> 
>> Hrmm, don't give up just yet!  I just read the FAQ and it seems, if
>> indeed you have the type of hosting control mentioned in this FAQ, try
>> to add this code to the .htaccess file.
>> 
>> <Directory />
>>      AllowOverride All
>> </Directory>
>> 
>> The FAQ tells me that mod_rewrite is enabled and should work for you
>> but, you probably have to tell it which directory for it to work on.
>> 
>> Anyways, try that.  Just add it to all your .htaccess files (I think
>> there are 3).
>> 
>> Let me know how it goes!
>> 
>> On Feb 8, 10:28 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>>> Thanks for the response.
>>> 
>>> Changing AllowOverride from None to All is what got it working on my
>> WAMP
>>> server
>>> as I understand Mod Rewrite won't work unless its set to All.  As mod
>>> rewrite does work
>>> on the package (there are some rudimentary examples in their FAQ)
>>> Their FAQ
>> Pagehttp://faq.1and1.com/scripting_languages_supported/configuring_apache...
>>> 
>>> Wordpress using Mod
>> Rewritehttp://elliottback.com/wp/archives/2005/05/06/permalinks-down/
>>> 
>>> I can get it all to work via built in rewrite, it works fine.  Guess I
>> will
>>> have to resign myself to
>>> not using mod rewrite - shame because its cool (tidy & clean)
>>> 
>>> Did / does your host claim to support mod rewrite?
>>> 
>>> On 09/02/07, [EMAIL PROTECTED] <
>>> 
>>> [EMAIL PROTECTED]> wrote:
>>> 
>>>> Looks like you will have to use the built-in rewrite rule.  I have had
>>>> problem with a server running virtual hosting... they need to change
>>>> AllowOverride to All in their httpd.conf file as well as the one in
>>>> your virtual conf file.
>>> 
>>>> Check out the built in rewrite services, here -->
>>>> http://manual.cakephp.org/appendix/blog_tutorial(Section 5).  Skip to
>>>> this part "define ('BASE_URL', env('SCRIPT_NAME'));".
>>> 
>>>> On Feb 8, 3:56 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
>>>>> I have managed to extract information from the support guys at the
>>>> hosting
>>>>> company here is what
>>>>> they say about the mod_rewrite rules of cake
>>> 
>>>>>> It would seem that the second line of code is simply not valid.
>> This
>>>>>> code here:
>>> 
>>>>>> RewriteRule (.*) webroot/$1    [L]
>>> 
>>>>>> it is likely that matching (.*) is too broad, this is probably the
>>>> cause
>>>>>> of the issue. You likely need to use a more specific terms. The
>> other
>>>>>> two lines work fine however:
>>> 
>>>>>> RewriteEngine on
>>>>>> RewriteRule ^$    webroot/    [L]
>>> 
>>>>>> although it gives 404 errors, seeing as "webroot" doesn't
>> currently
>>>>>> exist.
>>> 
>>>>> its working without the htaccess, but I would like to get it to work
>>>> with
>>>>> since that should work
>>>>> on the package that I have.
>>> 
>>>>> I think that 1and1 impose some restrictions on mod_rewrite since
>> they
>>>> are a
>>>>> Mass Hosting environment
>>>>> and I suspect that some of this information is withheld.  I also
>> think
>>>> that
>>>>> they did'nt really look into things
>>> 
>>>>> although it gives 404 errors, seeing as "webroot" doesn't currently
>>>> exist.
>>> 
>>>>> though it does.  Has anyone  managed to get mod rewrite to work on
>> 1and1
>>>>> with cakephp or got any suggestions
>>>>> is they a way to make this line (below) narrower / less specific?
>>> 
>>>>> RewriteRule (.*) webroot/$1    [L]
>>> 
>>>>>> I read elsewhere on the web that other users have had issues with
>>> 
>>>>> mod_rewrite in wordpress
>>>>> fore instance and they have been able to tweak the rules.
>>> 
>>>>> - S
>> 
>> 
>>> 
>> 
> 
> > 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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