0

I have a problem redirecting 404 errors to custom template.

My site structure is: project folder containing laravel and angularjs folders:

-> Project

 -> AngularTheme
 -> Laravel

In my .htaccess I have redirected the requests coming from / to /AngularTheme/index.php which is working fine.

RewriteRule ^(/)?$ ./AngularTheme/index.php [L]

Now, when anyone type in anything after the / i.e /foo it throws 404 not found error to which I am not being able to handle.

Inside laravel and Angular, there is not any problem redirecting to custome page.

Thanks for any help.

1 Answer 1

1

I would stick to what you know to do this.

here's a guide to do custom 404 handling in laravel

Though you can also play around in angular with routing to go to a specific page in certain cases.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Daniel, but this is not the solution, as I already mentioned that inside Laravel and AngularJS, I have no issue showing custom eror page. But the problem is I have my root outside both.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.