Я новый программист, в настоящее время изучаю php mvc. Я создаю систему framework/mvc с нуля... Теперь у меня проблема с .htaccess.
example.com = localhost // unable to post question for localhost link
Мой URL-адрес приложения выглядит так...
http://example.com/mvc/index.php?go=test //test is a controller's name
С помощью .htaccess я очистил URL-адрес на ....
http://example.com/mvc/test
If a controller does not exists it shows an error view, which contains some error message.
http://example.com/mvc/doesnotexists But if I put "/" (forward slash) in the url... http://example.com/mvc/test/ it shows the error but does not load any css or js file.
I have also included controllers method in url...
http://example.com/mvc/test/viewresult If no matched method found in that controller show error message, it shows but same problem...no css nor js.
I have fully loaded css and js if I go through full url
http://example.com/mvc/index.php?go=doesnotexists/ and so on
Я пробовал несколько правил .htaccess, но не смог заставить их работать. Пожалуйста, помогите и заранее спасибо.. Мой текущий код .htaccess...
<IfModule mod_rewrite.c>
# Turn on
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
#RewriteCond %{REQUEST_URI} !^/assets/
#RewriteCond $1 !^(favicon\.ico|favicon\.png|media|robots\.txt|crossdomain\.xml|.*\.css|.*\js)
RewriteRule ^(.+)$ index.php?go=$1 [QSA,L]
# Generic 404 for anyplace on the site
# ...
</IfModule>
<base href=>, который существует именно для этой цели. - person mario   schedule 16.08.2012