.htaccess - CakePHP and EasyPHP -


i'm new in php , i'm facing problems.

i'm using easyphp (devserver 14.1 -> php 5.5.8 , apache 2.4.7) , cakephp (2.5.1).

well, if put cakephp files @ "c:\program files\easyphp\data\localweb\" (then "c:\program files\easyphp\data\localweb\cake_2_0..." example), works fine, should.

the problem is: use alias on easyphp, don't want develop @ "c:\program files...". when put cakephp files on application root ("c:\myapps\myproject..." example, alias set on easyphp), "error 404". now, found if remove .htaccess file root, works. i'm sure file there reason, don't feel right removing - might give me more problems later.

does know it? can use alias on easyphp if want use cakephp? in advance.


edited

this apache_alias.conf (c:\program files\easyphp-devserver-14.1vc11\data\conf):

alias "/cakeblogtutorial" "c:/programacao/php/workspace/cakeblogtutorial" <directory "c:/programacao/php/workspace/cakeblogtutorial"> options followsymlinks indexes allowoverride order deny,allow allow 127.0.0.1 deny require granted </directory> 


this .htaccess (c:\programacao\php\workspace\cakeblogtutorial):

<ifmodule mod_rewrite.c>    rewriteengine on    rewriterule    ^$ app/webroot/    [l]    rewriterule    (.*) app/webroot/$1 [l] </ifmodule> 


on httpd.conf (c:\program files\easyphp-devserver-14.1vc11\binaries\conf_files), regarding mod_rewrite (in other words, uncommented):

loadmodule rewrite_module modules/mod_rewrite.so 


last lines on error.log (c:\program files\easyphp-devserver-14.1vc11\binaries\apache\logs):

[mon jun 02 14:27:48.093057 2014] [:error] [pid 4284:tid 848] [client 127.0.0.1:62831] script 'c:/program files/easyphp-devserver-14.1vc11/data/localweb/index.php' not found or unable stat [mon jun 02 14:34:59.319532 2014] [mpm_winnt:notice] [pid 1992:tid 312] ah00424: parent: received restart signal -- restarting server. [mon jun 02 14:34:59.982390 2014] [mpm_winnt:notice] [pid 1992:tid 312] ah00455: apache/2.4.7 (win32) php/5.5.8 configured -- resuming normal operations [mon jun 02 14:34:59.982390 2014] [mpm_winnt:notice] [pid 1992:tid 312] ah00456: apache lounge vc11 server built: nov 21 2013 20:13:01 [mon jun 02 14:34:59.982390 2014] [core:notice] [pid 1992:tid 312] ah00094: command line: 'c:\\progra~1\\easyph~1.1vc\\binaries\\apache\\bin\\eds-httpd.exe -d c:/program files/easyphp-devserver-14.1vc11/binaries/apache' [mon jun 02 14:34:59.988391 2014] [mpm_winnt:notice] [pid 1992:tid 312] ah00418: parent: created child process 6588 [mon jun 02 14:35:01.279844 2014] [mpm_winnt:notice] [pid 6588:tid 364] ah00354: child: starting 64 worker threads. [mon jun 02 14:35:01.523147 2014] [mpm_winnt:notice] [pid 4284:tid 364] ah00364: child: worker threads have exited. 


last lines on access.log (c:\program files\easyphp-devserver-14.1vc11\binaries\apache\logs):

127.0.0.1 - - [02/jun/2014:15:09:50 -0300] "get /cakeblogtutorial http/1.1" 301 242 127.0.0.1 - - [02/jun/2014:15:09:50 -0300] "get /cakeblogtutorial/ http/1.1" 404 1156 

i guess found answer - , if so, rewritebase correct thing do. cakephp website (http://book.cakephp.org/2.0/en/installation/url-rewriting.html):

for many hosting services (godaddy, 1and1), web server being served user directory uses mod_rewrite. if installing cakephp user directory (http://example.com/~username/cakephp/), or other url structure utilizes mod_rewrite, you’ll need add rewritebase statements .htaccess files cakephp uses (/.htaccess, /app/.htaccess, /app/webroot/.htaccess).


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -