CodeIgniter Forums

Full Version: 404 errors & The URI you submitted has disallowed characters. on non CI pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Scott Boyde[/eluser]
I am getting quite a lot of these messages on my forum (vbulletin) and some other non CI pages.

Not sure what the cause of this is but I thought I would has in case some one else has came across.

One thing I thought it might be is my .htaccess but not sure.

Code:
#--- DH-PHP handlers ---
#AddHandler php-cgi .php
#Action php-cgi /cgi-bin/dispatch.cgi

#AddHandler fastcgi-script fcg fcgi fpl
#AddHandler php-fastcgi .php
#Action php-fastcgi /cgi-bin/dispatch.fcgi<IfModule mod_rewrite.c>

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond $1 !^(index\.php|forum|leaguestats|predictionleague|robots\.txt|favicon\.ico|license.txt)
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>

El Forum

[eluser]BrianDHall[/eluser]
It sounds like it must be something related to your .htaccess file - here's mine, you might try it:

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

Obviously you'll need to add the directories/files that aren't CI. See if this makes any difference at all.

I'm afraid I don't even fully understand modrewrite, I just kept trying different code snippits until I got one that worked for me Smile

El Forum

[eluser]Scott Boyde[/eluser]
get No input file specified. when I try that.

El Forum

[eluser]Scott Boyde[/eluser]
The unfortunate thing for me at the moment is I cannot replicate the 404 problems, I do get the uri myself from time to time.

El Forum

[eluser]Mareshal[/eluser]
RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|images|stylesheets|javascript)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

Why do I think you forgot about rewrite base /

El Forum

[eluser]bretticus[/eluser]
Why RewriteCond $1 !^(index\.php|images|stylesheets|javascript) ?

Doesn't:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

exclude real files and folders from being rewritten already?

El Forum

[eluser]Mareshal[/eluser]
mine is working well Tongue

El Forum

[eluser]bretticus[/eluser]
[quote author="Mareshal" date="1252017691"]mine is working well Tongue[/quote]

Haha, I'm sure it is. I think perhaps it may be redundant though. Smile