Too Many Redirects Error

I have setup my website at https://screenhype.000webhostapp.com/ The index page redirects you to one of the four page but there is no redirection in those four pages but it is showing the following error-
This page isn’t working
screenhype. 000webhostapp. com redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

The site is working fine on my system. Can anyone tell me how to fix this?

What are you using as a script on your site?

@Infinity I am using PHP

Have you made any custom rules in your .htaccess or anything?

@Infinity Yes, I have added a few rules. This is my .htaccess right now-

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php
Options +FollowSymLinks

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^profile/([^/]+)*$ ./writers/profile?user=$1

RewriteRule ^top-posts/([^/]+)*$ ./writers/top-posts?user=$1
RewriteRule ^posts/([^/]+)*$ ./writers/posts?post=$1
RewriteRule ^mposts/([^/]+)*$ ./writers/mposts?post=$1
RewriteRule ^mp/([^/]+)*$ ./m/postsm?post=$1
RewriteRule ^tags/([^/]+)*$ ./category/category?cat=$1
RewriteRule ^mtags/([^/]+)*$ ./category/mcategory?cat=$1
RewriteRule ^edit/([^/]+)*$ ./writers/edit?post=$1
ErrorDocument 404 /writers/error.php

Does it function fine without the .htaccess file?

@Infinity Without .htaccess it is giving Errro 404. One more thing, too many redirect error is occuring on the pages with PHP script only, the simple html pages are working.

@ckhawand any ideas :stuck_out_tongue:

1 Like

I am getting an 404 error, seems the tags directory does not exist

@ckhawand Check now. I have placed .htaccess file again. Now instead of too many redirects I am getting blank pages. But pages without any php script are working fine such as https:// screenhype.000webhostapp.com/disclaimer.php
One other thing I have notices is that I have added a rule in .htaccess to add .php when not specified so when i try to open https:/ /screenhype.000webhostapp.com/disclaimer it is showing blank. I again checked it on my system and it is working fine.

When I load /disclaimer it brings me to http://screenhype.000webhostapp.com/tags/comics if I try again it takes me to http://screenhype.000webhostapp.com/tags/boxoffice

1 Like

@ckhawand On index.php I have a line of code which redirects you to one of four tags such as /tags/movies or /tags/comics but I don’t have anything like that on disclaimer page. When you open disclaimer page with .php extension it is working but without that it is redirecting to tags. Don’t know why…

1 Like

Works fine, clear you browser cache

Yeah .php works

But /disclaimer by itself does not.

my web site shows to many redirect. so i need some help any1 can help me

@summitgroup What is your website?