I would like to change the path of the website from http://localhost/en-in/pan
to http://localhost/en-in/individual/pan
without creating a folder individual.
Kindly let me know if there is anything.
Following is the .htaccess file
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
RewriteRule ^(.*)index$ /$1 [R=301,L]
RewriteEngine On example.com
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php [NC,L]
ErrorDocument 404 https://www.example.com/404
ErrorDocument 500 https://www.example.com/404
# or map them to one error document:
# ErrorDocument 404 /pages/errors/error_redirect.php
RewriteEngine On
RewriteBase /en-us
RewriteCond %{REQUEST_URI} ^/404/$
RewriteRule ^(.*)$ /pages/errors/404.php [L]
# or map them to one error document:
#RewriteCond %{REQUEST_URI} ^/404/$
2
Answers
It depends on the server you are running on.
On apache, this can be achieved by creating a
.htaccess
file on your root directory of the website and add there theRedirect
command:Create a
.htaccess
file under your base directory (public_html or www) and put the content:Then you can redirect your traffic from active link to the new link