I'm developing an internal site using Laravel 4, I have everyone working on my laptop (Windows & Apache).
I've now moved the site to a Turnkey Linux 13 VM for beta testing and have encountered the following problem:
The home page loads fine.
When I come to load the About page (or any other page) I get "requested URL /internal/about not found".
The Laravel config is exactly the same.
Apache's document root is set to: /var/laravel/public.
Apache gives the following error in the logs:
"File does not exist: /var/laravel/public/internal"
Yet the Laravel config is specifying the default view directory and the home page loads fine.
It was an Apache config issue, mod_rewrite wasn't enabled (it was on my Windows laptop), simply enabling this resolved the issue.
Related
This question already has answers here:
React-router URLs don't work when refreshing or writing manually
(55 answers)
Closed 2 years ago.
My single-spa contains 4 react applications. Each has its own react-router-dom. If I hit browser refresh from one of the 4 applications it says page not found. Application is deployed in the apache server in Linux OS.
I don't know whether I'm missing any configuration in the base application. It works fine in the development server which is webpack and node.
Yes, because your deployed application is not aware of the routes. In single page applications, only your / route exists. All routes in SPAs are client side routes and don't make seperate GET request to the server.
I faced the same issue when deploying my application to netlify. It showed default netlify 404 page. Then I added _redirects file to public directory with following contents:
/* /index.html 200
This redirected all 404 routes to default index.html and thus used the client side routing. You need to find something similar for your deployed version.
We are using windows 8.1 for one angular application. Installed the bower and npm, also installed node server.
We can see the login page after npm start but after login success we are not able to redirect. It showing error
Cannot GET /components/home.html
After inspect element Console error like this:
angular.js:11038 GET http://localhost:8081/components/home.html 404 (Not Found)
Header:
Request URL:http://localhost:8081/components/home.html
Request Method:GET
Status Code:404 Not Found
Remote Address:[::1]:8081
Referrer Policy:no-referrer-when-downgrade
Response:
Cannot GET /components/home.html
But it is working on linux machine perfectly. We are using .Net web api so we want to use one machine for both application.
Any help is appreciated. Thanks!
If you have tested on Linux and it works, I would say it is a configuration in paths the server that it is serving the assets. If you are using Express or Webpack to serve you React code, they have good support for Windows, so probably is a local configuration issue.
Try checking for any static paths, e.g. ./foo/bar and replacing them with a more Windows-friendly syntax, for example:
const path = require("path")
path.join("foo", "bar")
On my site under admin section node view (node/xxx) is working fine but when I am trying to edit a node (node/xxx/edit) give me following error
ERR_TOO_MANY_REDIRECTS
This issue is only on Pantheon when I do it on my local server it is working fine.
I already checked .htaccess and web.config file. The same configuration is working for me with another setup
Finally i got solution. Actually i installed ThemeKey module and the ThemeKey Debug creating redirection issue on Pantheon only i disabled it and site is working.
I am unable to deploy my angular 2 app with angular cli:
angular-cli: 1.0.0-beta.14
node: 6.4.0
os: darwin x64
The deployed site logs error messages telling that the inline.js, main...bundle.js, styles...bundle.js, favicon.ico Failed to load with status 404.
Everything works fine locally but problem starts when in production deploying to Github pages.
The base href is also properly set. May be a problem in CSP???
Kindly guide(Already lost 2 days) Error Screenshot
Actually I sorted out it just now!
I see that when site is deployed using the ng github-pages:deploy, the site that is generated will have site url like:
xyz.github.io/ng-app
and also the base url will be set like ng-app. Thing I did was set a variable baseUrl: "/ngApp" and set the base url to <base href="{{baseURL}}"> and everything is working now. I guessed that it picked up the app name specified in the angular-cli.json and so it did not match the repo name in github etc... thanks #shusson anyway
Please keep in mind, I have not worked with angular JS, nor did I write the code that is causing the error.
I am getting an 404 error on this path:
https://www.helivalues.com/Su6UsWuf/bb/option/mfg/all
but not this path:
http://www.helivalues.com/Su6UsWuf/bb/option/mfg/all
It was noticed that when a user views a certain page in https, the drop down does not load options. Angular Js makes a call to the path mention above which is not an actually file but is used by a php file that based on this path, has a switch that fills in the drop down.
Any ideas on how to get the https version to work? This is on a joomla site and I do have access to the htaccess file if needed. I really just need it to work for a few months while I work on building a new site.
Thanks!
Angularjs is not the issue. Your webserver (Apache/2.2.15 (SuSE) Server at www.helivalues.com Port 443) states the file can not be found. So it looks like something is misconfigured with your apache site.