Welcome Guest, Not a member yet? Register   Sign In
Default Controller Route
#1

[eluser]Pascal Kriete[/eluser]
I decided to seperate my system folder from my apps today. So I moved a bunch of stuff around, set the $system_folder and $application_folder variables in my index.php.

Then I tossed in my .htaccess file:
Quote:RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

And set
Code:
$config['index_page'] = "";

Now when I go to http://localhost/testpage/index.php it opens my default controller and everything works fine. The urls are rewritten properly, the links work - great.

But if I go to http://localhost/testpage/ it throws a The URI you submitted has disallowed characters. error.

I tried turning mod_rewrite off again, tried setting DirectoryIndex - nothing helps. This worked fine before I seperated my folders.

Any ideas?
#2

[eluser]Pascal Kriete[/eluser]
Still having this problem :long:.
#3

[eluser]tonanbarbarian[/eluser]
I find that if I have a site in a subfolder of the website and I want to remove the index.php I have to modify the .htaccess

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

You might also be able to do something with the RewriteBase I am not sure
so the following might also work, i think I tried it and it didnt but not sure
Code:
RewriteEngine on
Rewrite Base /testpage/
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]




Theme © iAndrew 2016 - Forum software by © MyBB