Drupal Login goes to wrong URL :: Problem started after site migration - .htaccess

I just migrated a drupal 6 site from the ('normal-live') host to a MAMP (Mac (L)AMP stack). I needed to do this so a client can have 'offline' access to the site in remote areas.
I used the backup/migrate module on the live site to get an export of the db. On the MAMP setup I did a fresh install of Drupal. Then I copied the modules, files, themes, etc. to the new install. After that, using phpMyAdmin, I imported the exported (from live site) SQL file to the new install on the MAMP. At this point everything appears fine at...first glance, I can nav to the different pages as an anonymous user, etc.
My problem is that if I try to login it takes me to the old URL (instead of going to http://localhost:8888/drupal-6.20/??? it goes to the 'https://originalDomain.com/???'). If I change the $base_url in the settings.php it wants to reinstall the site (drupal installer runs), I am also using the .htaccess file that got installed w/ the fresh drupal (not the one from the live site).
I am baffled...

Since you're getting redirected from an URL starting with http to a URL starting with https, check to see if you have the Secure Pages module installed and set to redirect users.

Related

Connecting Lucee v5.3.8.201 and IIS10.0.19041

I'm trying to convert web sites from Adobe ColdFusion (ACF) to the open source Lucee instead.
My issue is to make sure all my previous ACF work runs without error in Lucee before I upload it to the web. I have been able to install Lucee (v5.3.8.201) with Tomcat9, BonCodeAJP13 and Mod_CFML which I've been assured is what I need to have it all working together so I can test my sites (11 of them at the moment).
However I have some problems that I can't seem to find an answer to. The docs don't cover using a PC as a dev machine if it has multiple web sites on it. And IIS is the old version that's still used in Windows Server not Windows 10.
How do I get to the Lucee administrator What's the address for that? I need that to set up datasources for my sites of they're going to fail on the very first page.
How do I actually make sites defined in IIS10 work through Lucee? I have run the connector and TomCat is running, but the browser doesn't recognise any Lucee pages except the initial "Welcome to Lucee" page.

iis 10 Static Website: Deleting default site and creating completely new site (how to access new site)

This post needs help from experienced iis administrators, but must be explained in details for EXTREME newbies.
What I am doing:
I have two computers, both running Windows 10. One is a desktop and one is a laptop.
iis is enabled on both computers. Each computer can access the iis web server from the other and pull up a page from the other - using the ip address.
There is no DNS or host files being used (this is by ip address only), nor do I want to use any sort of naming.
Both computers are running an identical website, and the website files are in a different directory than the default. The structure is like this:
C:\inetpub\ROOT\myWebsite\myIndex.html
web.config
Changes I've made - now a few problems.
On both computers I have deleted the DefaultAppPool and the default website that comes installed with iis. This has not stopped the website from completely working, so adding that back seems unlikely to fix my problem.
I have deleted my application pool and website from iis (never deleting the actual files from the file system) several times, and added it several times. Each time I do this, my site comes back, but with the same problem I am having.
I have deleted all of the default documents, and the only default document listed in iis is myIndex.html.
myIndex.html initially displays a graphic image (using the standard tag), and this image comes up. Sort of. See explanation below.
The problem I am having
Before I started this project, I had iis working on the desktop with the default site and app pool and simply added some of my own files with really simple text content and some pics. I had replaced the default iis splash image with my own image, and all that worked with no problem.
the image that comes up is a link to another page that has a list of links to other stuff in my website. It all works no problem there.
Now, with the setup I have now, on the desktop I was originally using (in the paragraph above) if I pull up my website locally, myIndex.html loads in the browser and my image comes up, and everything works fine.
The same is true on the laptop, when I access the site locally.
However, if I attempt to access the desktop site (using its ip address) from the laptop, it pulls up the old splash image from the default site I deleted.( I left those files there even though I deleted the site from within iis). All those files are in the default location C:\inetpub\wwwroot.
If I move those files to another directory, thus leaving C:\inetpub\wwwroot completely empty, then when I access the site on the desktop (via the ip address) from the laptop, my new site comes up without a problem.
While it seems I may have solved my problem by moving the file from the previous project, doing that does not teach me how iis is actually working, and why files from a website that no longer exists in iis are still being accessed from remote computers.
So, please teach me something about the internal workings of iis, and how it chooses to access the different application pools and websites.
Again, please word your answers for complete newbies, because I know a little but not enough to get real technical.
I have been reading posts on stackexchange.com and other sites; links to microsoft docs etc. That's not helping as those docs are expecting too much prerequisite knowledge, and speaking in terms that are not really explaining things in a way I can understand.
You have described several different problems. I will try to address each of them (contrary to S/O recommendations).
First, when you make changes, and they don't seem to show up, it is usually because of caching. IIS always wants to cache files/configs. So does your web browser. So, to force an accurate test, you need to dump your browser cache and cycle IIS (to make sure it drops its cache and loads new files and configs). Start there.
Second, IIS is designed for settings inheritance. Which means, each app and each folder will inherit settings and permissions from the parent, unless you override them. Overriding them can be done by files and/or IIS configs (application vs folder). The IIS configs are the stronger of the two.
Also, the IIS config for "default files" might have come into-play for your test. If you didn't set up MyIndex.html as the top-most default file, then IIS would look for other files first. In fact, if you don't have MyIndex.html in the list of default files, IIS would have to depend on your app to choose that as a default page (MVC routing, etc).

ColdFusion 2016 Administration page doesn't load on cloned machine

I recently configured and hardened an installation of ColdFusion 2016 + IIS 8 in preparation for a upgrade from CF9. I was able to load all of our web, configure our data sources, and get everything pointed in the right direction. I was able to test that this server was working as expected so we created an image of this machine and loaded it onto another server. We put the cloned machine on it's own IP and gave it it's own domain name in IIS. So here's the problem, the ColdFusion admin pages doesn't work. It works on the original machine, and most of our web apps work on the cloned machine. There are some web apps acting up on the clone machine, but I believe I can solve that issue if I could just get to the CF Administrator page. Currently when we try to reach it at thissite.xyz:8500/CFIDE/administrator we get a blank white page. I created a virtual directory for it in IIS and get the same results.

Error 403.14 when serving page from IIS

This is very simple to reproduce:
Create a new VM (xtra small in my case, tried both Windows 2012
and 2008R2)
Install IIS using default config.
Create a Web Site using IIS Manager specifying a folder such as
C:\inetpub\simple.
Using Windows Explorer, create a new file called index.txt
Rename the file to index.htm
Edit the file with Notepad to make it a basic but valid html5
document and Save.
From IIS Manager, select the new website and click the Browse
Website link on the right side of the screen.
I get:
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Now look at the Contents of the web site in IIS Manager and you will see that the file has a .txt extension pasted onto the end : index.htm.txt
This does not happen on my local server.
I am new to Azure and probably missing something very basic but right now I feel like I am going insane. Can anyone put me out of my misery?
This is IIS configuration issue, not Azure specific. And I would not even say it is an issue at all.
index.html is not in the list of default documents for IIS. And has never been. index.htm however is. You get 403.14 forbidden, because Directory Browsing is by default forbidden in IIS. Again, absolutely typical IIS configuration which hasn't changed for ages!
Your solutions:
Configure index.html to be in default documents (read how to do this here)
enable directory browsing (read how to do it here)
For the sake of others as stupid as me, this is all down to Windows Explorer configuration. Normally, the first thing that I do with a new Windows install is to turn off 'Hide known filename extensions'. This time I forgot.

umbraco giving 404 on all pages except root. preview works fine

BACKGROUND
We are upgrading an umbraco 4.5.2 site running on Win2k8r2 / IIS7.5, SQL2k8r2 to umbraco 4.11.10. Given the number of steps required to perform the upgrade, we chose to do it offline and then replace production with the updated db and file system.
We did an offline upgrade to bring it up to 4.11.10 (4.5.2 -> 4.6.1 -> 4.7.2 -> 4.8.1 -> 4.9.1 -> 4.11.10). These upgrades affected the database and the filesystem.
The old system has 14 domains resolving to the 1 umbraco site. The domains are just aliases and per requirements are not set up with redirects from 13 of the domains to a master - instead, each domain serves the same content - just with a different host.
The 14 host headers are defined in IIS. They are also defined in umbraco under:
Content (folder)
EN (language folder)
Home (Hostnames are defined here)
Top Level 1 (also a child of EN)
Top Level 2 (also a child of EN)
PROBLEM
When we test under localhost (which is defined in IIS but not as a hostname in umbraco), the site renders content as expected. However, when we test with one of the hosts defined in IIS and in umbraco host names (after setting it up to resolve to 127.0.0.1 in hosts file), we are able to get to the home page but all other pages result in a 404.
The home page and preview pages render fine and the content editor and other backend admin features work fine. However, the "nice url" pages do not render and get 404 errors.
WHAT I'VE TRIED
I have deleted app_data\umbraco.config and republished the entire site.
Create a new website in IIS. Still get the 404 on pages other than site root.
Looked in umbracoLog table. Didn't see anything about 404s or anything that looked unusual in relation to before/after upgrade but I'm not an umbracoLog expert.
Is it necessary to do a clean install of 4.11.10 to install prerequisites that I may be missing? If so, what are these prerequisites and can they be installed independent of 4.11.10 install?
I'm at a loss as to what might be causing the issue. Any help would be appreciated.
A combination of items fixed the problem.
The main problem was having the hostnames defined in umbraco under the Home node. I removed the hostnames defined in umbraco at the Host node. Hostnames still exist in IIS.
In config\umbracoSettings.config
Set <useDomainPrefixes> to false
Set <addTrailingSlash> to false
In web.config set umbracoUseDirectoryUrls to true
Finally, fix a side-effect of removing the umbraco hostnames that causes requests for / to resolve to the EN node by adding the following to config\UrlRewriting.config
<add name="SiteRootHack"
virtualUrl="^~/$"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/home.aspx"
ignoreCase="true" />
There are several things you should check, but if you are getting Umbraco's 404 page and you can access the backoffice then that is a good sign at least!
The first thing to do is check Umbraco's logs at ~/app_data/logs/ to see what Umbraco is logging upon each request, if anything. Then check:
Have you installed MVC3 and 4 on the server?
Is the application running in a .Net 4 integrated app pool?
Have you applied "write" permissions to the correct folders?
Try removing any domain settings you have in the Umbraco backoffice, these are almost redundant if the site is a basic install.
If possible you should also create an Umbraco project from NuGet, this way everything you need with regards to DLLs dependencies are installed in the project. Also, there shouldn't be any need to upgrade in so many steps. It should be possible to upgrade from 4.5 to 4.7 then to 4.11 directly.
Finally, check the breaking changes in the Umbraco versions. For example, GetProperty("propertyName").Value returns a string in one version and then was changed to object in a latter version possibly 4.11, so this would obviously start causing NullReference exceptions which may be inadvertently be causing the 404's. It is unlikely you would be able to upgrade like this without having to make some code changes.

Resources