again plz. my folder structure under htdocs. where all the magic happens.
htdocs\yii\here i got:(framework|requirements|start)\under start i got:(css|…|protected|…|htaccess)
htdocs\yii\start\htaccess -> is this correct?
i have also tried to use htaccess without a . infront of name. still nothing happens…
what’s with the htaccess in the diretory protected. i have read that htaccess files in sub directories overwrite the htaccess files in parent directories
i changed allowoverride to all. now i get an server error.
my .htacces look like this. an is under the directory start.
Options +FollowSymLinks
IndexIgnore */*
<IfModule mod_rewrite.c>
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
</IfModule
It makes no sense to change the .htaccess if it’s ignored.
So first find out what’s wrong with your Apache config.
Actually you can also put all your .htaccess configuration into the VirtualHost section of your httpd.conf. That’s faster anyway as enabling .htaccess slows down Apache a little.
Oh, and you did restart your Apache after changing the config file, did you?
<VirtualHost 127.0.0.1>
ServerName localhost
AddType text/html .shtml
AddDefaultCharset UTF-8
...
<Directory "D:/path/to/your/project">
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
</Directory>
</VirtualHost>
ok. got it now with the url. but don’t know if the image problem is solved too.
i moved my folders in another direction and had to chek now the pat to the framework. take few minutes. so plz stay with me.
my apache is now configured like this:
NameVirtualHost localhost:80
<VirtualHost 127.0.0.1>
AddDefaultCharset UTF-8
DocumentRoot "D:/xampp/htdocs"
ServerName localhost
ServerAdmin bla@bla.de
AddType text/html .shtml
<Directory "D:/xampp/htdocs/start">
AllowOverride All
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
</Directory>
</VirtualHost>
i realised, that u need the line with AllowOverride. If u dont have this, the server crashes.
doin it now without a .htaccess
OK. So the url problem is solved now. but i still can’t see my images. and i also can’t find now my static pages…
There is a little mistake in the end (missed ">" symbol):
Options +FollowSymLinks
IndexIgnore */*
<IfModule mod_rewrite.c>
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
</IfModule>