You are not logged in.

#1 2010-09-04 05:32:57

Perkin
Member
From: Mendoza, Argentina
Registered: 2007-10-16
Posts: 14
Website

[SOLVED] Problem with .htaccess and user dirs.

Hi!..

I write here because i have a problem with .htaccess files and url rewrites.

I deployed a Cakephp[1] app in my /home/~asmerkin/public_html/books directory. This folder contains a .htaccess file with the following directives:

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

My server works well in user directories but it fails to rewrite urls. When i go to http://localhost/~asmerkin/books/ apache returns 404 error. If i go to apache log i find this:

[Sat Sep 04 02:02:02 2010] [error] [client 127.0.0.1] File does not exist: /srv/http/home

So the .htaccess is working but the url it rewrites is not correct. My httpd.conf file is this file[2]  and my httpd-userdir.conf is this one[3].

So i'd like to know if somebody can help me with this issue. I tried everything without results.

Thank you!

[1]: Cakephp.org
[2]: http://perkin.pastebin.com/g0dbbW2P
[3]: http://perkin.pastebin.com/fprNYCRY

Last edited by Perkin (2010-09-06 11:24:55)

Offline

#2 2010-09-06 11:23:50

Perkin
Member
From: Mendoza, Argentina
Registered: 2007-10-16
Posts: 14
Website

Re: [SOLVED] Problem with .htaccess and user dirs.

Finally i had to edit my .htaccess file adding a RewriteBase rule to it.

Offline

Board footer

Powered by FluxBB