I want to use htaccess to make an URL such as www.domain.com/profile.php?id=1 to www.domain.com/1/ and www.domain.com/1/contact or www.domain.com/1/gallery.
Would you like to help me?
I want to use htaccess to make an URL such as www.domain.com/profile.php?id=1 to www.domain.com/1/ and www.domain.com/1/contact or www.domain.com/1/gallery.
Would you like to help me?
This is the basic rule to hide index.php from the URL. Put this in your root .htaccess file.
mod_rewrite must be enabled with PHP and this will work for the PHP version higher than 5.2.6.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
i get it from here htaccess remove index.php from url