Cant get the mod rewrite going online

2007-05-02 Thread cakedude

Hi there,

I've build a pretty fine web application in cake which runs absolutely
smooth on my local server. However, when i try to put the app online i
get the (browser) message that my browser doesn't understand the
website's request.
Figuring that this would have something to do with the mod rewrite
module, i turned it off (uncommenting the line in the core.php) .
Unfortunately this only gives me access to the first (index) page.
When i try to access one of my views (for example 
www.mysite.com/cake/app/views/chapters)
i get a directory listing instead of the desired view.

Now i looked at my online server information ( phpinfo() ). This
stated under Apache that the mod_rewrite module IS loaded.

My knowledge of server settings is limited but after reading allot of
posts about the mod rewrite issue i realized that in order for the mod
rewrite function to work, i would have to make some changes in the
httpd.conf  file. Is this correct? If so, i do not have access to this
file (as i am running my website on a third party host) but is there
any other way i can use the mod rewrite function?

If not i would have to do allot of path changing in my application.
However, i am also still a bit confused about the dir listing when
turning mod rewrite off.

I hope someone can help me with these issues.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP 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: Cant get the mod rewrite going online

2007-05-02 Thread Dustin Weber

In my experiences, you can enable mod rewrite in some shared hosting
environments by placing something like this in a .htaccess file:

IfModule mod_rewrite.c
   RewriteEngine on
   RewriteRule^$ app/webroot/[L]
   RewriteRule(.*) app/webroot/$1 [L]
/IfModule

What you'll notice though, is that a .htaccess file exists in three
locations with that similar code in it within the cake directories (by
default).  Check to make sure those files exist on the server.  You
also might try to add the .htaccess file to the root (public_html)
folder of your server and that might help.  However, if phpinfo() says
it's enabled, that may not help.

Also, directly from the manual:
Make sure that an .htaccess override is allowed in your httpd.conf
(Apache), you should have a section that defines a section for each
Directory on your server. Make sure the AllowOverride is set to All
for the correct Directory.

You should be able to do this some other way (without needing access
to the httpd.conf)... I assume in the .htaccess file, but I'm not sure
I can tell you how to do that.

Also, this may not be related to mod-rewrite... have you googled the
error you get when leaving mod-rewrite enabled in the Cake core?

That stuff may or may not help, but maybe it will get you headed in
the right direction.

Dustin Weber
http://www.dustinweber.com







On May 2, 1:47 pm, cakedude [EMAIL PROTECTED] wrote:
 Hi there,

 I've build a pretty fine web application in cake which runs absolutely
 smooth on my local server. However, when i try to put the app online i
 get the (browser) message that my browser doesn't understand the
 website's request.
 Figuring that this would have something to do with the mod rewrite
 module, i turned it off (uncommenting the line in the core.php) .
 Unfortunately this only gives me access to the first (index) page.
 When i try to access one of my views (for 
 examplewww.mysite.com/cake/app/views/chapters)
 i get a directory listing instead of the desired view.

 Now i looked at my online server information ( phpinfo() ). This
 stated under Apache that the mod_rewrite module IS loaded.

 My knowledge of server settings is limited but after reading allot of
 posts about the mod rewrite issue i realized that in order for the mod
 rewrite function to work, i would have to make some changes in the
 httpd.conf  file. Is this correct? If so, i do not have access to this
 file (as i am running my website on a third party host) but is there
 any other way i can use the mod rewrite function?

 If not i would have to do allot of path changing in my application.
 However, i am also still a bit confused about the dir listing when
 turning mod rewrite off.

 I hope someone can help me with these issues.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP 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: Cant get the mod rewrite going online

2007-05-02 Thread francky06l

I had similar problem with one ISP. Actually adding RewriteBase  /
before the RewriteRule makes it works, fixing the base of the rule
to the webroot directory.

My .htaccess in webroot looked like this :

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]


Hope this helps.

On May 2, 1:28 pm, Dustin Weber [EMAIL PROTECTED] wrote:
 In my experiences, you can enable mod rewrite in some shared hosting
 environments by placing something like this in a .htaccess file:

 IfModule mod_rewrite.c
RewriteEngine on
RewriteRule^$ app/webroot/[L]
RewriteRule(.*) app/webroot/$1 [L]
 /IfModule

 What you'll notice though, is that a .htaccess file exists in three
 locations with that similar code in it within the cake directories (by
 default).  Check to make sure those files exist on the server.  You
 also might try to add the .htaccess file to the root (public_html)
 folder of your server and that might help.  However, if phpinfo() says
 it's enabled, that may not help.

 Also, directly from the manual:
 Make sure that an .htaccess override is allowed in your httpd.conf
 (Apache), you should have a section that defines a section for each
 Directory on your server. Make sure the AllowOverride is set to All
 for the correct Directory.

 You should be able to do this some other way (without needing access
 to the httpd.conf)... I assume in the .htaccess file, but I'm not sure
 I can tell you how to do that.

 Also, this may not be related to mod-rewrite... have you googled the
 error you get when leaving mod-rewrite enabled in the Cake core?

 That stuff may or may not help, but maybe it will get you headed in
 the right direction.

 Dustin Weberhttp://www.dustinweber.com

 On May 2, 1:47 pm, cakedude [EMAIL PROTECTED] wrote:

  Hi there,

  I've build a pretty fine web application in cake which runs absolutely
  smooth on my local server. However, when i try to put the app online i
  get the (browser) message that my browser doesn't understand the
  website's request.
  Figuring that this would have something to do with the mod rewrite
  module, i turned it off (uncommenting the line in the core.php) .
  Unfortunately this only gives me access to the first (index) page.
  When i try to access one of my views (for 
  examplewww.mysite.com/cake/app/views/chapters)
  i get a directory listing instead of the desired view.

  Now i looked at my online server information ( phpinfo() ). This
  stated under Apache that the mod_rewrite module IS loaded.

  My knowledge of server settings is limited but after reading allot of
  posts about the mod rewrite issue i realized that in order for the mod
  rewrite function to work, i would have to make some changes in the
  httpd.conf  file. Is this correct? If so, i do not have access to this
  file (as i am running my website on a third party host) but is there
  any other way i can use the mod rewrite function?

  If not i would have to do allot of path changing in my application.
  However, i am also still a bit confused about the dir listing when
  turning mod rewrite off.

  I hope someone can help me with these issues.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP 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
-~--~~~~--~~--~--~---