general problem with CI getting work :( |
[eluser]lemonek[/eluser]
To be clear: 1. I dont have any .htaccess 2. I use XAMPP server on Win XP 3. CI is localed at "htdocs\ci\" witch i access as http://localhost/ci/ 4. On htdocs\ci i have "system user_guide index.php licence.txt" Now my problem...: when i run: http://localhost/ci/ i gets default Welcome screen, but if i create simple controller under \htdocs\ci\system\application\controllers called test.php with content: <?php class Test extends Controller { function index() { echo 'Test CI'; } } ?> and run http://localhost/ci/test/ i gets servers default 404 page so i put .htaccess to /ci/ dir (im total noob with htaccess): RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /ci/index.php/$1 [L] and the i gets: The URI you submitted has disallowed characters. in config.php i have: $config['base_url'] = "http://localhost/ci/"; $config['uri_protocol'] = "AUTO"; $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
[eluser]garycocs[/eluser]
What I did first was to modify the Welcome controller, give that a go first and see how you get on??
[eluser]lemonek[/eluser]
[quote author="garycocs" date="1251686622"]What I did first was to modify the Welcome controller, give that a go first and see how you get on??[/quote] I dont know what you exacly mean but if i put: <?php class Welcome extends Controller { function Welcome() { parent::Controller(); } function index() { echo 'hello'; } } into welcome.php when i entering localhost/ci/ i gets hello but when i entering http://localhost/ci/welcome/ i gets: The URI you submitted has disallowed characters.
[eluser]garycocs[/eluser]
Bingo, so CI is working and you have changed a page ![]() I think the link should have been: http://localhost/ci/index.php/Test/
[eluser]lemonek[/eluser]
[quote author="garycocs" date="1251687024"]Bingo, so CI is working and you have changed a page ![]() I think the link should have been: http://localhost/ci/index.php/Test/[/quote] not exacly.... http://localhost/ci/index.php/Welcome/ http://localhost/ci/index.php/welcome/ http://localhost/ci/index.php/Welcome http://localhost/ci/index.php/welcome and same for test.... it always give me The URI you submitted has disallowed characters.
[eluser]garycocs[/eluser]
oh ya sorry only saw part of your htacess there, mine looks like this: RewriteRule ^(.*)$ http://localhost/ci/index.php/$1 [QSA,L]
[eluser]garycocs[/eluser]
Then the link: http://localhost/ci/Welcome/ should work.
[eluser]lemonek[/eluser]
i put .htaccess to a root-> htdocs RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ http://localhost/ci/index.php/$1 [QSA,L] and i gets again The URI you submitted has disallowed characters.
[eluser]jpi[/eluser]
PHP 5.3 compatibility problem. Read this : http://ellislab.com/forums/viewthread/124643/P0/
|
Welcome Guest, Not a member yet? Register Sign In |