Welcome Guest, Not a member yet? Register   Sign In
need help .htaccess problem
#1

[eluser]joeyvillas[/eluser]
i've put .htaccess in my ci folder and it shows Server error.. any idea how to fix this..?
#2

[eluser]Rick Jolly[/eluser]
Yes. Fix your htaccess file.

Seriously though, show us your file.
#3

[eluser]joeyvillas[/eluser]
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]


this is my .htaccess file..
#4

[eluser]phantom-a[/eluser]
Is that literally what you have in your .htaccess?

You need have this.
Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    #Removes access to the system folder by users.
    #Additionally this will allow you to create a System.php controller,
    #previously this would not have been possible.
    #'system' can be replaced if you have renamed your system folder.
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]

    #Checks to see if the user is attempting to access a valid file,
    #such as an image or css document, if this isn't true it sends the
    #request to index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>
#5

[eluser]Pascal Kriete[/eluser]
You don't need to have all that, it's merely a different method. Joeyvillas' code is what I usually use.
The difference between the two is that one is that one automatically excludes existing folders and the other one does not.

Of course, you should use what works, so do give both methods a try. A few other things to help you debug: Does your host support htaccess files - and more specifically mod-rewrite (not all of them do)? And, is CI in your docroot or in a subfolder?
#6

[eluser]joeyvillas[/eluser]
thanks guys for the replies..
#7

[eluser]M4rc0[/eluser]
I'll follow this thread this i'm having the same problem.
I'm using CI .htaccess file mentioned in the documentation and it doesn't work.

I'm running a test server and mod_rewrite is loaded according to phpinfo().




Theme © iAndrew 2016 - Forum software by © MyBB