My Apache error log shows the following: File does not exist: C:/Users/Nate/My Projects/yii/testapp/site
I believe my site structure is default. I have a yii folder that contains framework, requirement, and testapp on the same level. I haven’t changed the structure inside any of them.
This is my code:
httpd:
//httpd
<Directory "C:/Users/Nate/My Projects/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
and this is from my config file main.php
// uncomment the following to enable URLs in path-format
'urlManager'=>array(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array(
'<controller:\w+>'=>'<controller>/list',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
'<controller:\w+>/<id:\d+>/<title>'=>'<controller>/view',
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
),
),
Sorry, stupid of me to say php.ini (a few too many drinks), you’re correct in looking in httpd.conf
Here is my setup:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>
<Directory "C:/xampp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
Also, ensure you have ‘mod_rewrite.so’ in your ‘apache/modules/’ folder.
I also just noticed your path to the project ‘C:/Users/Nate/My Projects/yii/testapp/site’.
I’m pretty sure the space in ‘My Projects’ is going to cause you problems.
try to find if the mod_rewrite is enabled… it can be commented out… I don’t use xampp so I don’t know where is located the config for module loading, but it could be in the httpd.conf or some .conf file that is included from the httpd.conf…
search for LoadModule directive and check that it is not commented out…