Do I need to delete the file index.html generated by the hosting provider from files in Modx? - modx-revolution

I installed Modx through the built-in hosting download and there are generated files in the files index.html , mchost.php , index.php , config.core.php .
What to do with index.html ? I thought to rename it, but it turned out to be impossible inside the "files" tab -the field with the name is not clickable.
And what are the rest of the above files intended for?

index.php from MODX is critical and necessary, it's the entry point. config.core.php contains path to the MODX core, also necessary file out of the box. The rest do not apply to MODX, you can delete them.

Related

How to serve some static files of a certain file type, but not others?

My ASP.NET MVC project's root directory contains some typical static files, like robots.txt, manifest.json, browserconfig.xml, etc. If I'm not mistaken, each of these examples I listed should be able to be served with no involvement from MVC via GET requests to the root directory (i.e. mysite.com/manifest.json — if that's not true, please let me know).
I know from this answer that I can configure this behavior per file type in the Web.config. My question is, what if there are other .json files in my root directory that I don't want to serve, like compilerconfig.json or bundleconfig.json (both files generated by IDE tools)? What's the best way for the application to be able to serve some files of type X, but not others?
You can always ignore them via routes:
routes.IgnoreRoute("{somefilename}.json");
Another alternative would be to move the files you don't want to be served to another folder and add a web.config file to it to manage what gets served (or doesn't).
I am sure there are other ways. Modules come to mind...

How to configure rout to serve all files from subfolder using httphandler in asp.net mvc?

I have two websites in IIS under default web site. Lets say "Website1" page gives call to "webiste2" which return some content. Entry URL of website2 is http://domainname/websitename/controller/action this action return html(index.html). structure of website2 is as bellow.
Website
Folder(websitename)
........Folder A(folder_{id}(id is dynamically generated) is under folder A)
..............Folder_{id} --> this folder contains files with many extensions
........Index.html->this file has references to above folderA &subfolders files
........Web.config
Now i want to configure route such a way that that serve all types of files extensions for url like below.
websitename/folder A/filename.abc
websitename/Folder A/folder_1/filename.xy
websitename/folder A/Folder_1/filename.mp3
websitename/folder A/Folder_1/filename.png
There can be thousands folder under folder A. so the folder_1 value can be changed from folder_1 to folder_2, folder_3 .............. folder_1000 or as many folders.
I want generic rout to serve all dynamically generated folders and its files.
There are many files with different extensions under these dynamically created folder or we can see its as package of different files like .mp3, ,jpg, .swf, .js...
Please guide me to write rout to achieve above. Or you can provide links so that i can go through.
Simply, don't. Static files are supposed to be served directly by IIS. By default, in MVC, anything that has an extension (.*) is handled by IIS, and MVC is never even involved. If you've customized something, I'd recommend undoing that.

How to move bootstrap fonts to different folder?

I have a standard ASP.NET MVC application with Bootstrap. I moved the "Fonts" folder to "Content/Fonts". Inside the folder there are those glyphicons-halflings-regular files.
When I start the application I get a 404 browser error that the Fonts/glyphicons-halflings-regular.woff and glyphicons-halflings-regular.ttf file couldn't be found.
How do I configure my project so these files are found?
Solution was to update pathes in my bootstrap.css.
(See comments of original question)
Thx meep for your help.
One solution is to update paths in bootstrap.css. However, when you update Bootstrap, your changes will be lost. I'd recommend simply moving your stylesheet as well to keep the hierarchical structure found in the unmodified stylesheet.
For example, if you want to move your fonts in the Contents/Fonts folder (I always hate it being loose in the project root folder too haha), have your styles in the Content/Styles folder so that ../fonts/glyphicons-halflings-regular.woff (and so on) still references the correct folder.

Favicon with Meteor?

I'm trying to load a favicon into my Meteor project but I can't get it to work. I tried using this tutorial but when I put the mentioned reference in the of my HTML nothing happened. Also what do they mean by /public directory? I don't have a /public directory, should I just put my favicon.ico in the root directory?
The public directory doesn't exist by default - you just need to create it. Meteor uses the public directory in the root of your app to serve plain files rather than bundling them in the app. In order for a <link rel="icon"> tag to work, it needs to point to a file that exists in public. Note that the URL to the icon will not contain the path "public/" - files in public are served as if they were at the root of your web server.
A new Meteor app doesn't include any folders except the required .meteor directory. However, it will treat folders named public, private, client, server, and lib specially. You can also create more arbitrarily named directories. This affords you a lot of control over the exact structure of your app. Read about the Meteor directory structure in the Documentation:
Lastly, the Meteor server will serve any files under the public directory, just like in a Rails or Django project. This is the place for images, favicon.ico, robots.txt, and anything else.
Create client/header.html: <head><link rel='icon' href='/favicon.ico'></head>
Put you favicon.ico into /public folder.
Start server, open your browser and see the result.

Joomla, move whole site to different domain name

I have a website built in joomla and it is live on the web at a url:
http://oldsite.com
I have been asked to move it to another url - domain name
http://newsite.com
How should I do this correctly without messing up the site and joomla installation??
I did not find any references in Joomla to the domain that it is running under, so there should be no need to change anything. If the site name changes as well, update /configuration.php.
In practice, you may find that there are links with fully qualified domain names in your content that you will have to change. Queries like the following can help you find them:
SELECT * FROM `jos_content`
WHERE `introtext` like '%mysite.gr%' or `fulltext` like '%mysite.gr%'
If you are on Linux, run the following from the site root directory to make sure that there are no other references in the code, such as hardcoded image paths in templates or the CSS, etc:
find . -exec grep -iH "mysite" {} \;
Check the .htaccess file of the site for any custom rules that require a domain name.
So the problem is reduced to changing the domain for an existing site, or to creating a new site and moving the Joomla installation in the file system, and/or creating a copy of the database. The exact steps depend on your environment.
In Addition to what cdonner said , you need to modify the configuration.php file and remove all ref to the old site
You also need to empty the (cache folder)
Are you moving the site to a new host or account or just changing the domain name?
If you are just changing the domain name -
All you really need to do is keep the old domain name pointed to the same Joomla install and add a rule in htaccess to update the domain name to the new one. This not only fixes any fully qualified domain names in links within your content or modules, it also fixes any backlinks that might exist from old domains. Here is what you need to add to htaccess -
RewriteCond %{HTTP_HOST} ^oldsite.com [NC]
RewriteRule ^(.*)$ http://www.newsite.com/$1 [L,R=301]
If you are moving the site to a new host, do as Hanny says and use Akeeba backup to move the site.
In both cases you will want to make sure the old domain is forwarding to the new one and you have the above htaccess rule set up to fix any links that might otherwise be broken.
An important thing to do when moving from one domain to another is to ensure that both the log_path and the tmp_path reflect the new server settings and that they are both writable by Apache. If you don't do that, then you will likely have problems logging in to the server.
You will also need to ensure that the cache and the administrator/cache folders are also writable by Apache since Joomla 3.6.+ is throwing a fatal error if you're using file caching and these 2 folders are not writable.

Resources