I have a folder, which is inside a subdomain folder
The Folder is
/home/user1/public_html/subdomain/user/transfer
My subdomain folder is
/home/user1/public_html/subdomain/
There this folder call user in it, and transfer is inside user.
So the hierarchy is
subdomain > user > transfer
and inside transfer folder there are 2 files
index.php and also a .htaccess
My .htaccess rule is as followed:
RewriteEngine On
RewriteRule ^transfer/(.*) /transfer/index.php-action=$1 [R=302,L]
I trying to access the page by
https://subdomain.mywebsite.com/user/transfer/cash
https://subdomain.mywebsite.com/user/transfer/credit
https://subdomain.mywebsite.com/user/transfer/AnyWord
whereby it will load the content of
https://subdomain.mywebsite.com/user/transfer/index.php?action=cash
https://subdomain.mywebsite.com/user/transfer/index.php?action=credit
https://subdomain.mywebsite.com/user/transfer/index.php?action=AnyWord
But it give me an error
Not Found
The requested URL /user/transfer/cash was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
What should I do to handle this and make my .htaccess rewrite works.
I can access
https://subdomain.mywebsite.com/user/transfer/index.php?action=cash
I just want rewrite the url to something like
https://subdomain.mywebsite.com/user/transfer/cash
And it will load the content of
https://subdomain.mywebsite.com/user/transfer/index.php?action=cash
RewriteRule ^/user/transfer/(.*) /transfer/index.php-action=$1 [R=302,L]