I have a magento site. When I changed it location, it is not working.
I am getting the errors :
The page isn't redirecting properly in Mozilla.
This webpage has a redirect loop in Chrome.
For changing the location what I have done is:
1) Imported my database and changed the urls in core_config_data table.
2) Changed the db credentials in local.xml
3) Cleared the var folder.
I have found various solutions for the same problem but nothing resolved my issue.
Like clearing the cache, auto increment of ids in database etc.
I am able to access my backend
These are the steps I go through when I find such problems
Delete the cache, full page cache(If it exists) sessions, and log folders from with the var directory
Go into core_config_data
Using a Database tool, search (value "contains" http)
This will show you your site urls referenced from within the database.
Make sure web/unsecure/base_url and web/secure/base_url
both reference your domain without any https: at first
i.e they both should contain http://mydomain.com/
Last as kaigorodov says above check the cookie_path
Next, reference your .htaccess file. Here's an option
via terminal
cd into the root of your install. i.e
cd /public_html/magento
Again verify your .htaccess file.. One option is duplicate your existing file and rename the .htaccess-sample to .htaccess and use this one to be sure this isn't causing your problem.
Could be web server caching. Try restarting that if you have ownership.
Infinite loop problem often related to improper magento cookies configuration. Try to check the cookie_domain and cookie_path settings in the core_config_data table.
It's a www to non-www redirect. Because I don't have the install in front of me to help I can't narrow down the cause, but maybe within your core_config_data you use www on some and non www on others. Maybe your .htaccess has a www redirect in place?
Maybe Catalog > URL Rewrite Management turning the www to non redirect off may fix your problem
Related
I have a WordPress website at https://newable.xyz which is fine, if I go to https://newable.xyz/wp-admin I get redirected to https://newable.co.uk/money/financewp-admin.
This is definitely a 301 redirect.
I've tried the following things:
Deleting the redirecting plugin and all of its data
Clearing my browser cache
Using multiple different browsers
Using InPrivate/ Incognito
Using a fresh .htaccess file
Am I missing something obvious?
try search in your active WP theme - wp_redirect or wp_safe_redirect
_search in the theme to see if there is a wp_redirect or wp_safe_redirect as Vasyl said
_deactivate all plugins, both default and mu (a.k.a. mu-plugins) and analyse which one is causing you problems (if there is one that creates conflicts or creates the redirect).
_Try looking in the htaccess file (mod rewrite) of the root, every folder can have its own htaccess. You can have more than one .htaccess file on your hosting account, but each directory or folder can only have one, pay attention.
_Try to see if there is a server configuration (many hosting services have the ability to put a redirect to another domain)
-Delete the wordpress package in case it has been polluted with some injected code and download and reupload it.
I've just moved a WordPress website from my local machine to the server. All the normal steps were done, such as updating the SQL database and setting it all up. The only problem is the homepage is 301 redirecting to my local URL even though it has the correct URL to go to. The rest of the website is fine including the admin area. So far I've done the following:
Checked the SQL database to look for any localhost URL's
Defined the wp_home and wp_siteurl in the wp-config file
Also defined it in the functions file
Disabled caching
Flushed the permalinks
Disabled plugins
Checked for hardcoded URL's in the PHP
Deleted the .htaccess file and created a brand new one
Any further ideas please?
The solution to the problem was just browser caching, just needed to load it in a different browser which was cache free
I have a cakephp 3 script installed on my cpanel account.
this domain is the primary domain for account but i have relocated it to a subfolder for necessary reasons.
my htaccess rewrites it perfectly and every url works both with and without /subfolder/ in the url.
However, all the links in cakephp automatically append /subfolder/ back into the url.
I even tried manually replacing $base_url in configuration.php with 'mydomain.com'; only, but that didn't work. Then I replaced every instance in all the hundreds of files of $base_url with 'mydomain.com'; but still, nothing changed and it still shows that /subfolder/ in every url even when i access mydomain.com directly._
I need to get rid of this /subfolder/ in the url that cakephp is serving from php. i tried everything i knew but nothing works.
Please tell me how to solve this problem.
Have you tried setting App.base, App.webroot? Setting those values up will disable automatic directory detection and should help you get the URLs you want. See configuration docs for more on those values.
I'm having a strange problem with a new PHP page I´m writing. Everything seems to be loading/redirected to the domain root page.
domain.com loads fine
domain.com/page or domain.com/page/index.php always loads "domain.com" while retaining the /page/index.php in the browser URL.
Even domain.com/some_random_text loads "domain.com"
I suspected the .htaccess file, but there is none to be found. There are no redirects in the PHP code.
If I remove the domain.com/index.php file I get an Internal Server Error when opening domain.com/page/index.php
This domain did have Wordpress installed, but I did uninstall that via cPanel.
First thing to notice is that the .htaccess file can be anywhere in the path that is handled by Apache. So check everywhere. This kind of redirect could be made only like that.
This can only be done by Apache, so you might also like to check the apache config if you are running on a virtual machine or dedicated server.
Also, not that it might have been a wildcard redirect, added by the cPanel, so check those settings. Though I think those actually just modify the root .htaccess file.
Based on the data you provided I cannot say more, but I don't think this is a common issue.
I have copied drupal from my main directory to anothre directory and created a sub domain but the url rewrite is not working.
I have checked mod_rewirte is enabled and allow override is set to all but I can not access pages except home page also I changed $base_url to point sub domain and also reflected in .htaccess.
Please advise what I can do from here also searched on net for this but nothing seems to be working
Thanks
If you cannot log in to turn off clean urls and you have access to the database you can edit the setting in the database.
in the 'variables' table find the row 'clean_urls' and delete the row. Then when the setting is checked it uses the default which is OFF.
In my experience this breaks when you move Drupal but miss the .htaccess file. Or if it is moved into a directory that forsome reason has AllowOverride turned off in apache settings.