# Using myDomain.com/subject/ instead of full URL

**URL:** <https://forum.kirupa.com/t/using-mydomain-com-subject-instead-of-full-url/297277>\
**Category:** Uncategorized\
**Created:** [September 29, 2009, 3:45am UTC](https://forum.kirupa.com/t/using-mydomain-com-subject-instead-of-full-url/297277 "2009-09-29T03:45:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![riveroaks](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@riveroaks](https://forum.kirupa.com/u/riveroaks)\
**Post date:** [September 29, 2009, 3:45am UTC](https://forum.kirupa.com/t/using-mydomain-com-subject-instead-of-full-url/297277/1 "2009-09-29T03:45:14Z")

</div>

I’ve got a website which uses a PHP variable to get the current page, URLs look like

[www.myDomain.com/index.php?page\_name=myPage](http://www.myDomain.com/index.php?page_name=myPage)

But I would like to represent that URL using

[www.myDomain.com/myPage/](http://www.myDomain.com/myPage/)

How do I do this with code? Obviously I could actually build the directory structure, but that would defeat the purpose of using a generalized PHP template. I’m not sure what language support this needs - I’m guessing its a Javascript thing…
