Trying to remove path, file extension and, if present, a certain query parameter – Apache
I'm fairly new to .htaccess, but have gotten close to what I need, but am now stuck. Input: https://www.example.com/p/mypage.html Output: https://www.example.com/mypage This is achieved with the following: # Static pages: Remove /p from path and remove .html RewriteRule ^p(/.*?)(?:.html)?$ $1…