Anytime I open my client's website, the URL keeps on adding an unnecessary parameter
Example:
Website URL => https://example.com/
While loading, the URL will change into this
https://example.com/QKYUZ/YenNS/RQlKZ/QYSQc/SnSfZ/ljLWX/
or when login at the back office...
https://example.com/wp-admin/ => https://example.com/QYSQc/wp-admin/
I'm using WordPress, that happens either on the website or at the back office. Sometimes it will show different errors because of those.
Does anyone know what is happening or how can I fix this?
This is not the normal behaviour of WordPress. My first guess is, you have a plugin that's acting funny. I suggest you do the following;
Make a local copy of your website and set up using a local server and a database.
Once the site is up and running locally, go to plugins and deactivate all plugins. Re-enable them one after the other and you should find the culprit plugin.
This should help you resolve the issue.
Related
Hi I've created a dev site for testing my creations before they go live.
I've come to the site and all the images aren't there so I thought that may be a problem with the uploads folder, reuploaded from the live site and they still didn't appear.
Came to log in to wp-login and there was no styling on the login fields. Was strange so I tried to log in and it sent me to dev.mysite.com/dev.mysite.com/wp-login.php
So as you can see it seems to like to send me to a duplicate of the url and I can't for the life of me figure it out.
My wp-config file is as is:
define('WP_HOME','dev.mysite.com');
define('WP_SITEURL','dev.mysite.com');
I've change my actual url for security reasons as I work for a healthcare company. I'm sure you guys can understand. Any Idea why I might be getting redirected?
Also when I type in dev.mysite.com/wp-admin it takes me to the backend of wordpress as I have logged in through the buggy no styled form but then the backend of wordpress has no styling what so ever. See image below:
None Styled Wordpress Backend Image
Really hope someone is able to help as I'm baffled.
Thanks!
WP_HOME and WP_SITEURL should be a full URI, ie. http://dev.mysite.com. Also make sure your htaccess don't contain any wrong path redirects.
Edit: You get un-styled admin because Wordpress has the wrong base URI, so it is searching for stylesheet and scripts in the wrong folders. If you open the developer console you will prolly see a lot of 404 errors (file not found).
I'm trying to change the URL for my site, by going to settings in wp-admin and changing both site url and wp url.
All seems well after I save changes, I'm able to navigate around my blog using the new url. However when I try accessing wp-admin I'm getting a redirect loop. I can still access the wp-admin login page with the old url admin site. In order to access my admin page again I have to login to my DB and reset both urls.
I've also tried to add this code with my urls to my wp-config file
define('WP_HOME','http://www.sample.com');
define('WP_SITEURL','http://www.sample.com');
Other information about my setup:
Openshift is hosting wordpress with the quick start app and proper alias have been added to my app.
Cloudflare is managing my DNS
I wouldn't think either of these factors would be the issue because the site wouldn't work at all if one of these were misconfigured, but at this point I'm drawing a blank. Was thinking maybe it might have something to do with wordpress forcing SSL for wp-admin?
Found It!
I love how when you gather all the information to ask a proper question it seems to line you up for the solution.
I'm also using http://wwwizer.com/naked-domain-redirect to redirect naked domain request to www using an A record in my DNS. All I had to do was turn off cloudflare's protection to this DNS entry.
I am really new to Drupal and playing around with this existing Drupal site.
I did a FTP transfer of all the files to my local computer directory. I currently got it on a Vagrant box and I can access the site via http://192.168.56.101/html.
I can do http://192.168.56.101/html/anything-but-user and it brings me to the proper area on the site. However I can't do localhost/html/user, because it redirects me to the website URL rather than the local URL.
I tried clearing the cache (with Drush). I scanned all files in the system and changed the web url to the local URL [not sure if I need to do any other command], and I can't seem to find anything in the .htaccess files that would lead me to this.
The href="/user I would greatly appreciate any advice or help in figuring out this solution.
--UPDATED
There was a module called "Secure Pages" that was causing the user and registration links to be locked and static to prevent redirects to phishing sites. I had to disable this module using "drush pm-disable securepages" in the terminal.
Some typical items you may want to check:
Check if you get the same problem using another browser. If with another browser it works, then it is pretty sure a cookie problem. To solve that, delete the cookie in the browser where you have the problem.
Make sure "clean urls" is enabled. Refer to "https://drupal.stackexchange.com/questions/165029/clean-url-leads-to-duplicate-url-after-migration-to-another-hosting/165044?s=1%7C3.9647#165044" for more details on that.
Make sure the value of "base_url" is set correctly (in your settings.php).
If module Secure Pages is enabled, then try to (at least temporary) disable that moduel to see if it helps.
Apparently, there was a mod called "SecurePages" that was causing the URLs to be static to prevent someone from changing them and redirecting users to a phishing site.
Recently, after finishing our new drupal site, we made a copy of it to use as a staging site. We assigned it to a different url (new.domain.com/site versus old.domain.com/site).
As recommended, I changed the $base_url in the settings.php file to point to new.domain.com/site and that fixed most of the issues. The problem now is, whenever I make changes in the drupal backend, it wants to redirect back to old.domain.com/site. It looks like the change does go through, but it's still gets confusing and is an issue.
Where would I go to fix this? I tried the .htaccess already and it doesn't offer any clues.
We built a website for a client using Wordpress. We used a testing server which always works well. Wordpress was hosted as a subdomain, i.e. http://wordpress.ourcompany.com. I have direct and full access to the server. In the etc/apache2/sites-available directory the file describing the site in question uses the final name http://clientsite.com as ServerName, our temporary subdomain (under which we have been building) is a ServerAlias.
When we were almost ready, we of course asked the client (who already had a website) for their domain login. We changed the DNS like always. It resolved, the site worked well. Although Wordpress kept redirecting (of course) to the subdomain-variant, we could enter the site with the full domain.
Now comes the culprit. I changed the Wordpress settings (siteurl and home) to match the new site. The front-end works brilliantly. However, the back-end is unreachable as long as the settings are in this way. The login page shows up, but just redirects back to itself. If I simply change the Wordpress settings (in the options table) I can log back in, but we want to rid the subdomain necessity (of course).
Things I've already tried (I'm not one to easily ask of your time):
Clear .htaccess
Clear my cache & cookies
Different computer, different browser etc.
Change only the home and not the blogurl value. Sadly, this corrupts some plug-ins
Remove all plugins
Comment some lines as instructed in the wp-login file
Naturally, everything I could find on codex.wordpress
Set the admin cookie path
So, brilliant collective mind that is Stack Overflow, what did I do wrong? DNS? Wordpress settings? Thank you in advance.
You need to go into the settings on the live server and change the URL's to the current site. You'll have to do this by accessing the database directly. It's the wp-options table, and there are 2 entries where the url's are the value. Update those. That should fix the looping.
I found an answer today : the user in the database didn't had the right permissions. You can look up in the error log if there are lines that indicates this.
I also had tried before : removing all content from htacess, reinstalling wordpress etc.