Hide some middle part of the url

how to change url like http://mysite.com/forum/forum.php?id=1

ahttp://forum.mysite.com/forum.php?id=1

+3


source to share


1 answer


Do you want <<20> to be /foo

? If yes then use this code in your .htaccess:



Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteRule ^forum/(.+)$ $1 [L,NC,R]

      

+5


source







All Articles