wordpress: ERR_TOO_MANY_REDIRECTS - php

My website is setup on a linux server and behind WAF. The files are placed in root folder of apache server. The .htaccess contains rules as specified by wordpress.
The issue is that when I try to access my website as https://www.example.com, it gives ERR_TOO_MANY_REDIRECTS error. But when I try to access the website as https://www.example.com/index.php, it loads and works perfectly fine.
The couple of things I tried to pinpoint the error:
Deleted all files and folders from root folder and created a test index.php file. When I tried to access https://www.example.com, it displayed the contents of this test file
I also tried deleting .htaccess but this didnt help
I am still unable to figure out what the issue is. Can anyone please help out?

disable all your plugins.
in your theme if you using redirect code in your functions or other page , use exit() or die() after your redirect code.

After trying a LOT of suggested solutions online, I fixed the issue by using the plugin Redirection. This plugin solved my issue within minutes!!
Here is the link to the article which helped me.

Related

Website hosted on 1and1 only display index.php

I recently suscribed to a 1and1 hosting contract. I've been having issues to display my website, so I tried to put some very basic pages online in order to tell wether the issue was in my file or on the server side.
The homepage is named index.php and has a link to another page (page1.html) that is supposed to display a "Hello World".`
Clique
The homepage is online but there are some issues.
The homepage only works when it's called index.php and doesn't work when it's called index.html.
When I click on "Clique", the url changes to mywebsite.com/page1.html but the content is still "Clique" while it should be "Hello World".Also, the CSS file isn't read.
I've read a lot of threads dealing with similar issues and apparently it might be a problem with the .htaccess file. I don't have a .htaccess in the folder where my files are and I don't know much about how it works. Also, the CHMOD is 705 for both files.
Maybe try the 1and1 support for this issue.
I don't think this is the right place to ask.
Do you have root access, or just FTP.
If there is no .htpasswd, try uploading one.
A generator which will help you is just one google away.

What causes a wordpress homepage to load

UPDATE: Real links below to illustrate my issue.
Stick with me on this, because it is a valid question.
In the old days I could have danhoover.org which was a wordpress site and I could have danhoover.org/new which was another wordpress site and both would load fine. I could even point danhoover.net to the danhoover/new directory and the page would load just fine no matter how you got there. You could use danhoover.org/new or danhoover.net and it would load fine. All the permalinks would work. No problem.
Now, however, there is some sort of voodo going on. If a wordpress site is in the danhoover.org/new folder and configured to be "danhoover.net", navigating to the folder as danhoover.org/new will just get you a 404 error.
In addition, going to danhoover.org/new/index.php will get you a 404 error.
There is some sort of voodoo going on that makes you use the url defined in the configuration for the site to work properly. What is it? Is there any way to manually update the permalink structure so it loads properly with either domain?
I guess I'm just confused as to what in the world wordpress is doing that is different than any other php site that prevents it from loading.
UPDATED LINKS:
I have a folder /a which has campscoreboard.net pointed to it.
I have a folder /a/c which has www.c.campscoreboard.net pointed to it.
Wordpress links:
You can go to www.campscoreboard.net/c and the homepage loads
You can go to www.c.campscoreboard.net and the homepage loads and all
the links work.
But if you go to www.campscoreboard.net/c and click on a link like the
Hello World article, you're redirected back to the root for some
reason.
Vanilla PHP Links
You can go to www.campscoreboard.net/c/test.php and it loads fine.
You can go to www.c.campscoreboard.net/test.php and it loads fine.
Only the wordpress urls are redirecting back to the root when loaded via www.campscoreboard.net/c
I've not tried to install WordPress inside WordPress before, but ...
In the wp-config.php file of the relevant WordPress installation, you can set the correct URL and HOME directory manually using:
define( 'WP_HOME', 'http://danhoover.org/new/' );
define( 'WP_SITEURL', 'http://danhoover.org/new/' );
I usually add these after define('WP_DEBUG', false);
Hopefully this helps.
This shouldn't be related to the home configuration as all that would do is forward you to danhoover.org, not give you a 404.
This is likely a server permissions issue where your server is blocking access to the folders. This can be set either on the servers main config file (e.g. httpd.conf) or in a .htaccess file which can be placed in any folder to which one wishes to change its (/subfolders') permissions.
You can read some more here.
A quick way to help you diagnose this, create a static html file and place it in danhoover.org/new call it index.html and place some text in the file then load danhoover.org/new in your browser and see if the text you've written in the file appears, if not then you know it's a server/permissions issue, not a Wordpress one.

Wordpress 500 Internal Server Error with PHP pages in wp-content

I have several plugins that are shooting out 404 page not found errors when trying to load a page in the plugins directory.
For instance:
/wp-content/plugins/test/test.php
When I go to that link, I'll get a 404 page not found error. If I go to a link for a file in the plugins directory, it will load up just fine, i.e. /wp-content/plugins/test/test.jpg
What could be keeping php files from loading? My htaccess is the default. I've tried disabling all plugins. Site works fine in my local development environment, but not on my new GoDaddy dedicated hosting environment. Any help would be hugely appreciated!
First off rename .htaccess to .htaccess.txt as for security it doesn't allow direct access if that doesn't work check the path again

WordPress Installation Within CakePHP

I am new to stackoverflow.
I have already installed a WordPress blog(WordPress version 3.9.2) within a CakePHP(CakePHP 1.3) site.
I have followed this link:
http://www.balistupa.com/blog/2010/08/how-to-redirect-appwebrootblog-into-blog-wordpress-cakephp/
Changed both the .htaccess files as mentioned in the link.
Its working perfectly.
But the problem is if I write the url like: www.mydomain.com/blog/ then its working perfectly
But if I write www.mydomain.com/blog, that means without a / at the end, it is still redirecting to www.mydomain.com/app/webroot/blog/.
Can anyone solve this out? Do I need to make any more changes to that .htaccess files?
The tutorial on that link says that if I wont write that / at the end it will be redirected to the proper url without any problem, but still its not working.

Wordpress not showing pages!

I've installed wordpress locally, and created a few pages, but when I try to refer them, they do now show up. Instead I get a 404 error. when I try to open http://localhost/mySite/About page, it tries to open the file D:\mySite\About, which doesn't exist. Any problem with permalinks or htaccess file?? My site is at D:\mySite and I'm creating a new theme. I've created the page.php file so that it shows my page but no luck.
If you're working on Windows you need to work with the web.config instead even with PHP because that's how IIS works.
More information here:
http://learn.iis.net/page.aspx/466/enabling-pretty-permalinks-in-wordpress/
I'm using wamp, the problem was that, by default, mode-rewrite was not being loaded. My mistake, now it's working.

Categories