URL Redirect / URL Masking [closed]

Try creating .htaccess and putting the following in it:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteRule ^ICEEC$ viewjc.php?id=c5 [L]
RewriteRule ^ICEEC/$ viewjc.php?id=c5 [L]  

</IfModule>

Make sure that the viewjc.php is at the same directory as your .htaccess

If you’re just trying to change URL address bar when someone visits particular page of your website, add this to your PHP code page:

if ( $_SERVER['REQUEST_URI'] == '/viewjc.php?id=c5') {
    echo '<script type="text/javascript">window.history.pushState("", "", "/ICEEC");</script>';
}

Everytime when a user goes to viewjc.php?id=c5 your URL will be changed.

Besides you could again use .htaccess for doing that!

Leave a Comment