Check for errors in WordPress redirects—maybe incorrect settings are causing the access-denied issue!
Check for errors in WordPress redirects—maybe incorrect settings are causing the access-denied issue!
Hello Linux enthusiasts, I’ve encountered some challenges with my WordPress setup on a root server. Please note the forum thread I’m referring to is likely the correct place for this discussion. If not, feel free to clarify. I’m experiencing problems and tried to pinpoint them. My assumption is that there’s an issue with the redirect behavior—specifically, when I try to access https://www.mydomain.com/wp-login.php it immediately sends me to https://mydomain.com/ with an "Access Denied" notice. What might be happening here?
I suspect there could be two reasons: first, the WordPress site URL and home URL aren’t properly updated. I think I need to instruct WordPress that it’s now operating under the domain www.mysite.com. This should be done directly in wp-config.php, outside of the warning message. Should I proceed with this change? What are your thoughts?
Possible steps I’m considering:
- Modify wp-config.php:
```php
define('WP_HOME', 'https://www.mydomain.com');
define('WP_SITEURL', 'https://www.mydomain.com');
```
- Clear the cache and reload the page.
- Let me know your feedback.
Background: My domain is hosted on a server without SSL, so I was using HTTP for sites/mydomain.com. This made me concerned about security. However, my server admin has been reliable for years and confirmed that there’s no way to run www.xxx.com and xxx.com simultaneously without a paid wildcard certificate.
What do you think? Should I make these adjustments?
You're not sure about WP, but I understand you can obtain free wildcard SSL certificates via Let's Encrypt.
You may wish to connect your administrator with Let's Encrypt. They provide complimentary wildcard certificates. If wildcard options aren't available, you can combine two distinct certificates with a web server that allows vhosts—essentially any contemporary server. Any modern browser supporting SNI will be able to reach the site.
hello you both first of all - many thanks for the quick reply - and for sharing your ideas and experience. i ll take the wildcard certificates into consideration the first workaround was to add the two lines to the config define('WP_HOME','https://www.mydomain.com'); define('WP_SITEURL','https://www.mydomain.com'); - again - thank you for all your tipps - and ideas. - i really want to think about a. adding the wiidcard-certs b. other things more btw: the Lets_Encrypt - certs are the ones that we use. AFAIK above all - i am so glad to be part of this forum - its a awesome place. - keep up the great place of idea-sharing and knowledge-exchange. greetings