When I run angular application locally # gets removed from the url as I have made changes in app.module.ts, but when I deploy the project on the server PathLocationStrategy doesn't work, I get internal server error or page not found error or else # doesn't get removed from the URL.
How can I remove # from the deployed site?
Related
I have created a react app using create-react-app and running it using command
set HTTPS=true&&npm start. Also, I'm using the axios for AJAX call.
In the app, I want to use the mock data from the JSON files which are in the local directory under the src/shared/mockdata folder but somehow I'm getting the 404 error/ Cannot GET /assets/logo-80x80.png though I have given the full path https://localhost:3000/shared/mockdata/current.json and this same thing is happening with loading the images as well.
I used npm run eject and tried it by setting the value false of disableDotRule of histodisableDotRuleryApiFallback in webpackDevserver.config.js file.
I am trying to follow the instructions from here to enable offline support (Service worker) in my polymer starter kit clone.
However, after making the changes in gulpfile.js, index.html and elements.html, I keep getting the following error whenever I refresh the page.
Also if I change the throttling setting to offline in Chrome Developer Tools and refresh, the page comes back with the "Unable to connect to the Internet" message so clearly the caching isn't working.
Is there anything else that I need to do?
Update: Just decoded the url (i.e. http://localhost:5000/bower_components/platinum-sw/platinum-sw-register.html&clientsClaim=true&skipWaiting=true&version=1.0) in the error message and ran it in Chrome and got a 404 error. If I remove everything after .html then the file can be found though.
I was having the same issue and turned out it's because the platinum-sw-cache is set to disabled in the dev development, which means service worker will not work if you run
gulp serve
So to test the PSK offline, you need to call
gulp serve:dist
You can also ignore that ERR_FILE_EXISTS error as explained by #pirxpilot.
I was created a PHP 5.4 application with Web load balancer and mysql 5.5 support on openshift free plan. My problem is when I login into my app via SSH delete the index.php file in app-root/runtime/repo folder (Openshift web folder) and create new test.txt file, my application doesnt show test.txt file. It still shows Openshift welcome page when I access my application.Then I delete test.txt file. The app-root/runtime/repo folder is empty. I tried create new file name 'blahblah' in runtime folder and access but still nothing, only 404 page. However, restart the application doesn't resolve the problem! The problem only happend when I add 'Web Load Balancer'. Without load balancer, my PHP app working normaly event I delete index.php file
When you use the "Web Load Balancer", it runs in front of your application and monitors which of your web servers are up and running. You can visit http://app-domain.rhcloud.com/haproxy-status to view the status of your backend servers. If nothing responds at the root context (/) of your application on the web servers, the haproxy thinks it is down and takes it out of rotation. You have to have something (even a blank index.php or index.html) page so that the haproxy will get a status 200, or change the url that is monitored in the haproxy.cfg file on your main gear.
In my config file I have:
# Site domain name (for sitemap.txt generation)
url : http://development.adityaraj.divshot.io#http://adityaraj.com
url : http://localhost:4000
When I run the server locally all looks good, even after build the _site folder/index.html also works well. But when I deploy it to divshot it is still using my local urls for asset files, hence the styling and images are all missing.
Also I am using boilerplate theme from: http://prettystack.github.io/jekyll-blog-starter/
How do I config it to work correctly for both the locations. And I do not want to manually change it every time I deploy. Please help.
Strangely it was a simple fix:
url : # just an empty setting takes care of this
I have successfully implemented rest webservice using apache wink. I am using ant to build war and to deploy it to tomcat server. Now I want include html or jsp file in the project to display some results. But I dont know how to include it via ant build file. I tried copy and pasting the html file in the root folder as well as web-inf folder in tomcat's webapp folder and than restarted it. But so far I am not able to access it. Whenever I try to access html page it gives me error
org.apache.wink.server.internal.RequestProcessor - The following error occurred during the invocation of the handlers chain: WebApplicationException (404 - Not Found) with message 'null' while processing GET request sent to http://localhost:8080/outliers/index.html
Please help me how can I include html file in my server.
Basically you should just put the html file in the war's root directory. \
Don't put it in WEB-INF, it's is not accessible from the web!
If the html file in root directory, and you still cannot access it, check that tomcat started without errors. Sometimes errors are not displayed in console, so check the logs.