I have this route defined $route['download/(:num)/(:any)'] = 'download/index/$1/$2';
What I want is, mydomain.com/download/444/filename.mp3. Now problem is when I pass the url without extension .mp3 it works fine, but when I give url with .mp3 it shows 404 of nginx. i.e.
mydomain.com/download/444/filename.mp3 ERROR
mydomain.com/download/444/filename SUCCESS
You can try this solution for your problem:
$route['download/(:num)/([a-zA-Z0-9.a-zA-Z0-9]+)'] = 'download/index/$1/$2';
I Hope it will help you.
Related
I have a project in react that works on the computer excellently.
But after I do build and upload it to the server all the json files in the public folder get a 404 error (even when I try to access them directly and click on the url I get the same error.)
But the icon and png files from the same folder do appear.
Another problem (which is probably also related) is that when I go through the link pages on the site it goes great. But if I type them directly in the url I get a 404 error message
I tried to add to json
"homepage": ".", "
But even that did not help.
Anyone have an idea?
edit:
the json works .. I had to change the settings of the mime types according to the instructions: https: //docs.plesk.com/en-US/obsidian/administrator-guide/website-management/websites-and-domains/extended- website-management / using-virtual-directories-windows / adding-and-removing-mime-types.65216 /
But I was still left with the problem that when I go directly to the url address it makes me an error page (when the project is on the local host, it works fine!)
Regards,
I deployed my react app to netlify but some links looks like it's broken. I'm already aware that I should have a_redirects file or netlify.toml but even if I add
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
there is still errors on "special url", especially urls with more than one path params like "www.app.org/example/1234656" or "www.app.org/blabla/rerezzer", all url with only one "path param" like www.app.org/oneParam working when refreshed.
What I'm missing, I already try to add another redirect rules like from =/*/* but it's not working
I also faced the same issue for more than one path param, but tried a simple logic
../* /index.html 200
It worked for me
I have uploaded my reactjs app in S3, everything is working fine, the routes work well but only on first level subpages.
For example:
myapp.com/products -> works
myapp.com/products/1 -> does not work
myapp.com/activate -> works
myapp.com/activate/user -> does not work
How can I fix this?
I've already set up the S3 bucket to redirect on index.html also in case of error, but, as I say on top, this work only for first level folder.
On localhost everything works fine.
Sorry but when I write my question I've made some test and I've noticed that react is loading also in deeper level url (app.com/first/second) but the js are not loaded correctly because the path change. The problem is solved by changing the homepage paremeters in package.json from "." to "http://myapp.com"
Hope this help someone.
Thank you
I'm having issue with my url..i actually was trying to remove # tag from my url..which is done but the problem is now if i'm having url like this
http://localhost/xyz
it redirects me to
http://localhost/xyz/home
but the if i try and refersh the same page
http://localhost/xyz/home
it gives 404
any one knows how to solve it..
Thanks.
so actually now i'm able to open http://localhost/xyz/home directly with url rewrite which will point to my index.html.but now the bigger issue is whenever i'm trying to run my project it says unable to start debugging and none of my service is getting called it says 405(metod not allowed).i tried iisrest.but no luck.
so if you have any ideas,please share and thank you.
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.