Is there a difference in page paths when on localhost verses deployed? - react-native

My app is created in next.js and works great in localhost. When I deployed it in heroku, only the front page shows up and all page paths do not work even though they are correctly inputted in the browser. The only page that is connected to the index.js file in my page paths is the front page. Do the other pages need to also be connected to the indec.js file? I am terribly lost with this issue since the site works perfectly in localhost. In heroku every page path besides / has a 404 error. I didn't add any code to this question since no one file seems relevant to the issue. I've been searching all over for an answer to this issue but can't seem to find any relevant information online since the app is deployed successfully it just won't render any file paths besides /.
Thank you in advance for any help you can offer. I really appreciate it!

Applications are ran differently on localhost and when deployed to the server. Since you added react tag on the post, I assume you are trying to deploy react native app on Heroku, there is lots of information on internet how to do it.
For example this post.
Anyway first you need to build your app correctly, so static files would be generated (you didn't mentioned how you are running that app).
To your question:
Relative paths are the same on both local and server, but absolute paths will be different.
But for your 404 error I see that no static content are found on the root path.

Related

SSL Certificate added to website causing tabs, accordion and menu drop-downs to stop working

I have recently added a SSL Certificate to my website but it’s causing issues with some functionality no longer working when the site is accessed with https. The tabs, accordion and menu doesn’t work on the https version on the below links for example.
http://waflfootyfacts.net/player/stats.php?PlayerID=4764
https://waflfootyfacts.net/player/stats.php?PlayerID=4764
Any idea where I can start looking at the fix? Is this a common thing that can happen with SSL?
I am not a web developer and had an old work mate help me with the site and I’ve been self-taught since and this has stumped me.
I am using metro-bootstrap css and am using relative paths throughout the site except on the header where I am using absolute paths
I eventually found the issue - I had a JS loader that was loading http script

Route problem on production after build vue application

So, I'm building an application with Vuejs and after we finish her we decided to finally build for production. Everything worked just fine while building and etc, but when the application was really being hosted, we noticed some issues that we do not saw while on localhost (development and production).
I'm saying this after a lot of tests and researches about it because first, I thought that the problem was after building to production but we tested another way to host and it's not apache that is causing this issue and I really think that is not the code either. Anyway the problem is when we first access the application our login page is the first that you can see and it works just fine at the first access but if the user refreshes the page for any reason the page loses all her CSS because the route /auth/login goes to /auth/login/ and after some tests I can confirm. That bar that is added at the end of the route makes the page lose CSS.
This problem we solved by adding an exception on our .htaccess (we know that this is not that best practice but anyway) after this solved we saw another problem: when we click on a link for example /auth/login?token=12334567890 the token param simply disappear and the user is automatically redirected to /auth/login. So we think that maybe these two problems are related because when we first access and log in everything inside the application works as it should, these two problems are only occurring on our login component. My question is what is causing this problem only on this page? It's a vue-router that is causing?

Vue built a product to upload to the server

I'm building a web page for an event using bootstrap-vue (I started the projet with vue init bootstrap-vue/webpack my-project). I've used vue-build prod to compose and uploaded the whole folder to my server using filezilla. The problem is that the website is not fine, just a part of it is sawn.
Can you formulate the question differently? Its hard to find out what it is exactly you mean with
The problem is that the website is not fine, just a part of it is
sawn.
What does the console in your browser tell you? Vue has alot of debugging tools built in, so maybe you can post the console output, then we can tell a bit more..

Path problems with running a sub application (umbraco) inside my MVC4 web application

I have this MVC4 web application, I run it locally at mySite.local/. I created an application in IIS 7, mapping to mySite.local/corporateSite/. I point that application to an Umbraco (CMS) installation I have locally.
This works pretty well.
I have these UI images and .css files that were in my corporate site and were linked-to by absolute urls (Examples: /css/myCss.css, /media/ui/myFunLogo.png, etc.).
Now this "/" root has changed, if I want my css and images to work, I have to use /corporateSite/cssmyCss.css... this is logical.
How can I change my configuration or sites setup or code so that I don't have to write that whenever I'm linking to a file like that. Should I use rewrite rules to prepend the application url?
How to people integrate these elements normally ? I know a lot go through subdomains, but this would not be ideal for us at the moment.
Thanks for the help!
(I think my question is related to this one how to integrate umbraco with mvc4 but in some different aspects. And the answers are not good for me.)
In umbracoSettings.config, there is a setting for "ResolveUrlsFromTextString".
Setting it to true should tell Umbraco to add the virtual directory name to links and images.

Apache not loading CSS files on remote browsers but works on localhost

I have an ubuntu installation on my laptop i use for web app development. When i type in http://localhost/blah.php i see my php web page as i normally would with all css style loaded and rendering fine.
When i try to connect to this same apache server from a remote machine by typing in the IP address the page loads but without any css styling at all. I also get the same problem trying to connect to the apache server from a virtual machine on the same box. I would like to get this working so i can test my web apps in IE but obviously css not loading is a problem. Any tips ?
Look into your source code and look how your style sheets are referenced.
If you have references to http://localhost/mystylesheet.css, that's your problem right there.
If that doesn't help, try to access a style sheet directly (enter the address in the browser) and tell us what happens. Also post the URL you are using. The head of the HTML document you are calling would also be helpful.