Welcome Guest, Not a member yet? Register   Sign In
rewrite rules break my site
#1

[eluser]merik[/eluser]
I just setup apache with php and then created a simple website using CI. It works perfectly; it only shows index.php in the addresses, which I intend to remove. So I used this in my .htaccess:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|static|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Now even when I go to the home page of the website, I get a 403 error: You don't have permission to access / on this server.

Any suggestions?
#2

[eluser]merik[/eluser]
Found the solution: I had to add this to the beginning of my .htaccess

Code:
Options FollowSymLinks
#3

[eluser]zykapratama[/eluser]
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]




Theme © iAndrew 2016 - Forum software by © MyBB