Why won't my default url page load without /index.html? - default

I want my URL to display my index.html file as default but only loads an OLD practice html page I uploaded to the FTP a few months ago. How can I make site load on www.me14ch.leedsnewmedia.net rather than its current www.me14ch.leedsnewmedia.net/index.html ?
(and yes I am aware the index.html looks very blank at the moment, this is because I need to update links in dreamweaver because I moved the file, just want to get the default url working first!) Many thanks

I am not sure what container you are using but in any tomcat base project you can specify the welcome file in container (web.xml).
In web.xml
< welcome-file-list >
< welcome-file >/index.jsp< /welcome-file >
< /welcome-file-list >
In apache you can use steps explained here

Related

How do I access a file in a directory from html in a Wordpress Site?

I am trying to use reactjs components in wordpress. I was following this tutorial -
https://jhinter.medium.com/using-react-based-web-components-in-wordpress-f0d4097aca38
Until I got stuck at the last part: I have added this as an html custom block to an empty page:
<script src="/apps/csptest-component/direflowBundle.js"></script>
<csptest-component></csptest-component>
The console prints out:
GET http://www.adminprofi.com/apps/csptest-component/direflowBundle.js net::ERR_ABORTED 404 (Not Found)
I have used FTP to put the file in a folder called apps/csptest-component in the root directory of the wordpress site and I can see that the upload was successful. Do I need to change the link that the src is pointing to? Any help is appreciated!
WordPress allows you to access files in the wp-content directory, so best practice would be to have a child theme setup and then you can upload your javascript to the directory: wp-content/themes/child/js and access it using http://www.adminprofi.com/wp-content/themes/child/js/direflowBundles.js .
It's recommended to use a child theme to ensure your script doesn't get removed when your theme is updated (plenty of resources on how to do this). Create a folder in here called js for tidiness.
EDIT: I think it will be easiest for you to upload your script to: /wp-content/themes/Divi/js folder, and then you can access your script like: <script src="http://www.adminprofi.com/wp-content/themes/Divi/js/yourscriptname.js"></script>

Make a hugo static website site navigate correctly when browsing from the local file system

I understand that the normal workflow with hugo is to generate a static site using the "hugo" command, and then deploy your site by copying the public/ directory to your production web server. I don't want to do that: I just want the html files in the public/ directory to display correctly, and have links that work, when I open them in my web browser. I do not want to run the "hugo server" command.
Specifically, the links that are generated are all missing "index.html" at the end.
For example, a link to the About page will be:
file:///C:/Users/myusername/Documents/HugoTesting/quickstart/public/about/ which will open a view of that directory when I click on it. But it will display the web page properly if I can change the link to: .../public/about/index.html
How can I make that change throughout my site? I already set "relativeUrl" to true in my config file, as it says to do here:
https://gohugo.io/content-management/urls/ as it was necessary to get my index page to display properly. The documentation there says this helps to " make your site browsable from a local file system" so I know it must be possible.
I've tried using permalinks and using frontmatter to try and add "index.html" to all of my links, but hugo is adding an extra '/' to whatever I specify using permalinks, and while the "url" tag in the frontmatter works, it's not feasible for me to do for every url in every page.
I think ugly URLs configuration in Hugo might help you with this, (e.g., example.com/urls.html).
Set uglyurls = true or uglyurls: true in your site’s config.toml or config.yaml, respectively.

Deploying Angular Application to GitPages - Not Routing Properly

Disclaimer: I am not a frontend guy by trade. I am being asked to deploy an Angular application other engineers have created.
I have gone through the process of deploying an Angular application to GitPages and have also tried the handy Angular CLI GH Pages library. However, they both have the same issue, and I'm not sure if it's the application itself or how I am deploying it.
The base page loads fine, but all other resources (image/font files, links to other pages, etc.) do not load properly. This is because they are not using the proper base URL; our corporate GitHub makes us use https://....com/<org>/<repo> as the URL. All resources outside of the base page are not prepending the /<org>/<repo>/ part to the URL, so they are all returning 404s.
My index.html file in docs/ contains the proper base href="/<org>/<repo>/" and the docs/ folder contains all needed images and font files in its assets/ subdirectory, so I'm not sure what gives. I have also copied index.html to 404.html.
Am I missing something? Or is it possible that this web application was not created correctly for GH Pages?
Thanks in advance :-)
Change the base href to index.html only and all will work from there
base href="index.html"
From there it will take the path properly

AngularJS 1.2 Not allowed to load local resource

I know it would be great if the file wouldn't link to local resource, but using phonegap/steroids framework, FILE_URI returns "file:///Users/" path which I can use for uploading to S3 or else, but Angular won't show it in the template.
Is there a possible solution? I tried adding config to my app
.config(function ($compileProvider){
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel):/);
})
but it seems that doesn't have impact on the error.
I can base64 encode my images (then works), but I would like to avoid this if possible.
thanks
See the Camera example in the Steroids Kitchensink app, where the Cordova File API is used to move the picture from the tmp folder to the Steroids app's User Files folder. Since Steroids's localhost looks for assets both in the App folder and User Files folder, you can use an absolute path, e.g. src="/my_image.png". See also the App Structure on Device guide for more information on the App and User Files folder.

URL rewriting is not properly configured on your server

I tried upgrading my cakephp version from 1.3 to 2.5 but encountered an url rewriting problem. Another cakephp app runs on the same version so I'm sure the mod_rewrite works.
Although when I go to example.com/pages/home I get following error:
URL rewriting is not properly configured on your server. 1) Help me configure it 2) I don't / can't use URL rewriting
When I go to my normal home page and I want to click on a home link I get following url :
http://example.com/app/webroot/index.php/
And it is the same for other urls.
http://example.com/antwerp becomes http://example.com/app/webroot/index.php/antwerp
When I go to http://example.com/antwerp the site works as it should...
Any ideas where I've gone wrong?
I would suggest accessing your account and re-uploading your .htaccess files from and to the following locations respectivelly.
/app
.htaccess
/webroot
.htaccess
.htaccess
Some FTPs do not upload those files automatically until you force it to.
If that does not work, check if you have your php.ini file in your public_html folder of this application.

Resources