Monday, June 29, 2020

using Htaccess file URL remove links php

OLD :: page.php?page_id=taurus
NEW: page/taurus



RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/?page/(.*?)/?$ /page.php?page_id=$1 [L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /page\.php\?page_id=([^\&\ ]+)
RewriteRule ^/?page\.php$ /page/%1? [L,R=301]

No comments:

Post a Comment