Remove id and index.php via htaccess in Sub directory in websites URL

Remove id and index.php via htaccess in Sub directory in websites URL


Remove id and index.php via htaccess in Sub directory in websites URL


current URL: domain/index.php?id=p123 

I want:  add www remove:index.php remove 'id' form URL 


Example Code:

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*/)?([^/]+)$ /$1index.php?id=$2 [L]
RewriteCond %{THE_REQUEST} ^GET\ /(.*/)?(?:index\.php)?\?id=([^\s&]+) [NC]
RewriteRule ^ /%1%2? [R=301,L]


Example Link: https://stackoverflow.com/questions/33517582/remove-id-and-index-php-via-htaccess-in-subdirectory

Example Link: https://drive.google.com/file/d/18vbcuWSRfq6BCCvZDi6J8QMbHyEv3eFL/view?usp=sharing

HOME