I have one HTML page. Assume the URL is
http://localhost/local/local.html
but i want to mask the URL as
http://localhost/local/abc
can we do like this?
I have one HTML page. Assume the URL is
http://localhost/local/local.html
but i want to mask the URL as
http://localhost/local/abc
can we do like this?
Create a .htaccess file in your root of your domain and add the following in that file:
RewriteEngine On
RewriteRule ^local.html$ http://localhost/local/abc/ [R=301,L]
In .htaccess add lines:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php?query=$1 [QSA,L]
When you visit https://localhost/local/abc in index.php parse $_GET["query"] how you want.
You can achieve the required action using a htaccess rule ,
Learn about htaccess at :
.htaccess rule you can implement is follows :
Options +FollowSymlinks
RewriteEngine on
rewriterule ^local/local.html (.*)$ http://localhost/local/abc$1 [r=301,nc]