Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

skip a folder name in path while displaying in address bar

I want a folder name not to be displayed in address bar. Example: hiding "members" folder:

www.mysite.com/members/jonesmith/index.php

www.mysite.com/members/tome/index.php

www.mysite.com/members/jerry/index.php

...etc

I want to put those links like this:

www.mysite.com/jonesmith/index.php

www.mysite.com//tome/index.php

www.mysite.com/jerry/index.php

...etc

and when the link is clicked the address bar will show the same, i.e, without "members".

I need this make the pages of the members or the urls short.

Of course any link clicked within the pages of the member will not show the "members" in address bar.

Shortly: the folder "members" exists but it will not be visible to the visitors in every level.

Any idea using php script, javascript, .htaccess ..etc?

like image 244
fadhil Avatar asked Nov 13 '22 21:11

fadhil


1 Answers

If you use Apache you can use the mod_rewrite module for this.

http://httpd.apache.org/docs/current/rewrite/

I'm sure IIS support somthing like that to.

like image 67
PeeHaa Avatar answered Dec 10 '22 21:12

PeeHaa