I am working on laravel project. I have created a cms table and had crud for CMS pages. In the front end, I've cms pages in the footer where I've to redirect the user using htaccess. I've created a view file for showing the cms content and I am fetching details on the basis of page id. For example page id 1 is for aboutus. If I am giving the link as pages/1 then it is showing the page content properly. I want to show the URL as aboutus instead of pages/1.
I have the following code in my public/htaccess file
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteRule ^aboutus/$ /pages/1
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
WIen i am redirecting user to /aboutus it is showing 404 error. Please let me know how to redirect the user to /aboutus.
Any help will be appreciated.