Strange redirect / rename behavior on website - wordpress

I have a website that has started exhibiting strange redirect behavior. It is a wordpress site running on Apache.
I've disabled all the wordpress plugins, disabled/baselined the .htaccess file to a wordpress default. None has had any effect.
What is happening is if you go to:
http://siteurl.com/dir it redirects you to https://siteurl.comdir
(deletes the / between .com and dir)
I've tried googling etc. can't seem to find any clues of where to look. I'd appreciate any tips on where to check/adjust. I've looked at the site's DNS configuration on the hosting provider and I can't see anything that would be affecting it. I have other sites on the same hosting provider/vps and they work correctly.

I think you can try one thing disable all pugins as well as the activate the default wordpress theme. After then change the permalink to default. I hope this will work for you. Let me know so i can find other solution.

Related

I am facing Wordpress Redirection Hack on my WordPress Website

I have facing redirection hack in my WordPress website someone changed my site url.. how it is possible for someone to change site url without getting WordPress Access.
by modifying one of the files on your server, e.g. your .htaccess file, wp-config.php or pretty much any other you can think of. Admin access is not necessary.

WordPress permalinks Issue on Localhost

I have this problem, so far i change or permalinks or delete .htaccess file and everything worked but this this this is not the issue. Have broken links on few link with 404 error. Home page i most of the links works but 3-4 of them don't. Tried so far everything that I thinks should work or worked before. Deleted .htaccess file, disable plugins and themes restore to default, change permalinks structure, my WAMP server have enabled rewrite module on for apache, even in htppd.conf have AllowOverride All.
I dont have any ideas left and I would appreciate if someone have some new idea or something that I have missed so far.
After days of searching for the problem finally find it. It was conflict with plugin and my custom added css was conflict with one plugin same name and this was causing the issues on links.
Considering that I lost time for this i needed to share this info with all of you. Usually permalinks problems were solved with changing settings for permalinks but this was something else, and probably I'm the only one that have same name in css with one plugin and this cause the problem.
Hopefully this will help someone if come to same or similar issue.

Wordpress too many redirects issue on localhost

I am facing the issue as described in the title. I am working on a Woocommerce site with default WP Twenty Nineteen. Everything was working fine but I have mistyped https in the WP admin General Settings Site Url field. This caused too_many_redirects error on both Chrome and Mozilla. I have tried clearing cookies and complete browsing data, disabling plugins, changing permalinks and deleting htaccess file but none of this worked. Maybe this can help but strangely I can access admin but cannot see none of the pages. Any help would be appreciated. Thanks!
In wp-config.php add this 2 lines (with your protocol+domain_name):
define('WP_HOME','https://yourdomain.com');
define('WP_SITEURL','https://yourdomain.com');

Issues with Wordpress permalink /index.php/%postname% instead of %postname%

I've tried to change my permalinks from example.com/index.php/postname to example.com/postname, but nothing has worked. When I change them in Wordpress, I get 404 errors for example.com/postname. I've noticed this is a common issue, but none of the suggested solutions have worked.
Mod_rewrite is enabled on the Apache server. The .htaccess file has been updated. Still nothing. In the meantime, I'm wondering if I could do a redirect that would send anyone with the example.com/postname link to example.com/index.php/postname. What's the best way to do that?
You generally need to save permalink structure twice. If that doesnt work install wp 2017 theme > delete your theme > reinstall your theme from scratch.
If you have cloned your website - you should go to the original site, back it up and then deploy it! a good plugin to do this is updrafts if you don't know how to do it mannually. Don't use a cloning plugin - some plugins/themes don't work with them.

One page won't show on wordpress after moving from live to localhost

I moved my website from live to localhost to make some modifications to it and I have encountered a problem, one page will not show up: "Oops! That page can’t be found.".
I have tried the following
1. activated rewrite_module
2. deactivated each plugin to see if anyone is causing the problem
3. recopied the database and files in case of failure during the first transfer
4. read that resetting permalinks might solve the problem. Changed permalinks to default - the page now works, but when I changed back to custom the problem is still there.
This is weird because only one page does not seem to show, every other page works fine and also there is no problem on the live version.
I ran out of solutions can any one please help?
This may be caused by the permalink or .htaccess
check the url of your page if no issues on URL then
Follow this steps once:
Go to settings-> permalink-> set it as default ->Reload or refresh
Then again now Go to settings-> permalink->postname
Your .htaccess will get update with the permalink.
This could be a problem with htaccess. When using the query string urls in wordpress, no htaccess is required, but for anything else Wordpress uses mod_rewrite.
Is htaccess turned on your localhost Apache server? In httpd.conf, AllowOverride All should be turned on in your active directory.
Is Wordpress able to create new files? Insufficient permissions might prevent it from creating the htaccess file.
Finally, check that your links are pointing to the right place. Sometimes the problem is as simple as a misspelling in your link ;) Good luck.

Resources