Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to configure ORDS standalone server to work with a React application that uses client side routing

doberkoflerNov 25 2024

How can I configure Oracle ORDS (standalone server) to work with a React application that uses client side routing.

Client side routing needs to ensure that ORDS serves the React app's entry point (index.html) for all routes managed by the client side router. This is essential because router handles routing on the client side, while ORDS, being a backend service, could otherwise interfere with routes it doesn’t recognise.

In OHS this was done by using the Apache RewriteEngine but how can this be done in ORDS?

<Location /my_app>
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html
RewriteRule ^ index.html [L]
</Location>

Comments
Post Details
Added on Nov 25 2024
2 comments
64 views