1

I'm newbie with htacces.. I've file htaccess like this

    Options -Indexes

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  RewriteCond %{REQUEST_URI} ^system.*
  RewriteRule ^(.*)$ index.php?/$1 [L]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 /index.php
</IfModule>

I called url like this without index.php it's work

http://localhost/url/

but when I try to call

http://localhost/url/controller/

and

http://localhost/url/controller/method/

the page back to xampp's home.

so what would I do? I want url without index.php.

thank you very much every advice.

7
  • it's doesn't work , i got 404 Page Not Found The page you requested was not found. Commented Aug 15, 2013 at 3:23
  • Do you have any other htaccess files? Specifically, any in the "controller" directory? Commented Aug 15, 2013 at 5:45
  • Your site under the url folder or root? Commented Aug 15, 2013 at 6:50
  • Please, see my answer stackoverflow.com/a/18230894/1613335, maybe it will be helpful for you Commented Aug 15, 2013 at 8:57
  • no i just have one htaccess file. Commented Aug 16, 2013 at 1:35

1 Answer 1

0

Looks like you need something simple like:

RewriteEngine on
RewriteCond $1 !^(index\.php|assets|media|favicon\.ico|ipadicon\.jpg)
RewriteRule ^(.*)$ /index.php/$1
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.