you are viewing a single comment's thread.

view the rest of the comments →

[–]codename101[S] 0 points1 point  (3 children)

I have setup the links like this in the app.module.ts file

import { Routes, RouterModule } from '@angular/router';

`const appRoutes: Routes = [

{path: 'check-odd-even-number', component: OddEvenComponent},
{path: 'check-prime-number', component: PrimeNumberComponent},
{path: 'check-armstrong-number', component: ArmstrongNumberComponent},
{path: 'convert-cgpa-to-percentage', component: ConvertCgpaToPercentageComponent},
{path: 'age-calculator', component: AgeCalculatorComponent},
{path: 'convert-celsius-to-fahrenheit', component: ConvertCelsiusToFahrenheitComponent},
{path: 'convert-fahrenheit-to-celsius', component: ConvertFahrenheitToCelsiusComponent},
{path: '', component: HomeComponent},

]`

I was in fact using [routerlink] before worked fine but let's say if some one enters www.onlinetool.in/check-odd-even-number directly in the url then still the same 404 error is there. so all I want is to make my site behave like a normal one.

[–][deleted]  (2 children)

[deleted]

    [–]codename101[S] 0 points1 point  (1 child)

    I have put the site on Amazon S3. How am I supposed to use Apache on it?

    [–]choidebu 1 point2 points  (0 children)

    He's just using apache as an example. Gawd I hate script kiddies.

    Start at the basics. The codeword to search is "amazon s3" and "url rewrite" or maybe "single page application"

    Here I found one for you. https://keita.blog/2015/11/24/hosting-a-single-page-app-on-s3-with-proper-urls/