I am trying to do an SEO-friendly URL in the CloudWays server but it's not working. Also, When I try it in the localhost or Cpanel it works fine.
Thanks!
This is my .htaccess file code:-
Options +MultiViews
RewriteEngine On
# Set the default handler
DirectoryIndex index.php index.html index.htm
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php/$1 [L]
RewriteRule ^validate/([a-zA-Z0-9-/]+)$ search.php?phoneNumber=$1
RewriteRule ^validate/([a-zA-Z-0-9-]+)/ search.php?phoneNumber=$1
This is the main link:-
https://example.com/search.php?phoneNumber=16503858068
And I want it like this:-
https://example.com/validate/16503858068