CodeIgniter Forums
website not displaying - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: General Help (https://forum.codeigniter.com/forum-24.html)
+--- Thread: website not displaying (/thread-62891.html)



website not displaying - rooye - 09-05-2015

hello everyone

my website that was displaying with all the pages opening well has suddenly started acting otherwise.In google chrome it end with the message:

"This web page has a redirect loop. ERR_TOO_MANY_REDIRECTS" and in firefox:
"Firefox has detected that the server redirects the request for this address in a way that will not succeed. The cause of this problem can be disabling or refusing cookies."

It does open in opera either. Now i have deleted cookies over and over, used ccleaner to clear every trash to no avail.I have used different PCs to no avail so i have concluded that the problem is related to server side.I have remove and put back the .htaccess file but nothing changes. The .htaccess file has this code:

# masking the index.php page so that it is not seen in the url
Options -Indexes
# activating URL rewrite.
RewriteEngine on
#
# fixing the url rewrite rules. here we are using white list.
#
# all url that do not correspond to this mask will be rewritten.
RewriteCond $1 !^(index\.php|assets/|robots\.txt)
# all other url will be redrected to the index.php page.
RewriteRule ^(.*)$ index.php/$1 [L]

At some moment in my searchi came across this other code and used

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]

but still it did not work. At some moment the home page opened but the css file seemnot to have been loaded as there was no make.Moreso,no clicked link worked.

Please help am in deep shit. Thanks for your usual efforts to help


RE: website not displaying - rtorralba - 09-05-2015

(09-05-2015, 01:47 AM)rooye Wrote: hello everyone

my website that was displaying with all the pages opening well has suddenly started acting otherwise.In google chrome it end with the message:

"This web page has a redirect loop. ERR_TOO_MANY_REDIRECTS" and in firefox:
"Firefox has detected that the server redirects the request for this address in a way that will not succeed. The cause of this problem can be disabling or refusing cookies."

It does open in opera either. Now i have deleted cookies over and over, used ccleaner to clear every trash to no avail.I have used different PCs to no avail so i have concluded that the problem is related to server side.I have remove and put back the .htaccess file but nothing changes. The .htaccess file has this code:

# masking the index.php page so that it is not seen in the url
Options -Indexes
# activating URL rewrite.
RewriteEngine on
#
# fixing the url rewrite rules. here we are using white list.
#
# all url that do not correspond to this mask will be rewritten.
RewriteCond $1 !^(index\.php|assets/|robots\.txt)
# all other url will be redrected to the index.php page.
RewriteRule ^(.*)$ index.php/$1 [L]

At some moment in my searchi came across this other code and used

DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]  

but still it did not work. At some moment the home page opened but the css file seemnot to have been loaded as there was no make.Moreso,no clicked link worked.

Please help am in deep shit. Thanks for your usual efforts to help

Hi,

Put the following code at your .htaccess:


Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

And remove your index_page value at your config:


Code:
$config['index_page'] = '';

The second step is not specified at documentation:

http://www.codeigniter.com/userguide3/general/urls.html


RE: website not displaying - rooye - 09-05-2015

Thanks for the suggestion but it did not help.The page was displayed in black and white (in firefox)with no design effect from css. in chrome nothing at all except the usual "This web page has a redirect loop. ERR_TOO_MANY_REDIRECTS"


RE: website not displaying - rtorralba - 09-06-2015

(09-05-2015, 01:05 PM)rooye Wrote: Thanks for the suggestion but it did not help.The page was displayed in black and white (in firefox)with no design effect from css. in chrome nothing at all except the usual "This web page has a redirect loop. ERR_TOO_MANY_REDIRECTS"

Give all data about your web please:
  • Operative system
  • Web server
  • Virtual host
  • Project path
  • Project Folders/files tree...



RE: website not displaying - RobertSF - 09-06-2015

Have you tried not using htaccess at all, just to eliminate it as the cause of the problem? If you're using a Windows system that makes it hard to create or rename files to start with dot, you can just temporarily delete the contents of htaccess and leave the file itself. That will have the same effect.

Without htaccess, the only difference is that your URL must include the index.php part.

Code:
no  - http://www.example.com/products/show
yes - http://www.example.com/index.php/products/show

If it displays fine without htaccess, the problem is not htaccess.

I know you think it's a server-side issue, but you might consider reinstalling the codeigniter files, just in case. Also, do you have or can you at least temporarily install some other PHP application. Wordpress is easy to set up. If a server-side problem is affecting CI, it should affect other applications that use PHP.