.htaccess - Htaccess rewriting to root folder with parameters from sub directory -


i having parameters in url.

 https://www.example.com/subdirectory/reset-password/123/123  

i want https://www.example.com/reset-password/123/123

where first 123 first parameter , second parameter 123

i making rule below link: want be

https://www.example.com/subdirectory/reset-password?p=123&q=123 

to

i want `https://www.example.com/reset-password/123/123`  

i using following link reference hide folder name particular url using .htaccess

use this:

rewriteengine on rewriterule ^reset-password/([^/]*)/([^/]*)$ /subdirectory/reset-password?p=$1&q=$2 [l] 

it give following url:

https://www.example.com/reset-password/123/123


Comments

Popular posts from this blog

iis - ASP.Net Core CreatedAtAction in HttpPost action returns 201 but entire request ends with 500 -

gcc - Neither ld wrap nor LD_PRELOAD working to intercept system call -

ssh - Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer -