0

I'm not very technical with any code other than HTML so bear with me! This has me stumped so I'd really appreciate help with this.

I've got a simple site with file names like index.php, portfolio.php, portfolio-001.php, about.php etc. When people are browsing my site, they see:

  • "mysite.com/index.php"
  • "mysite.com/portfolio.php"
  • "mysite.com/portfolio-001.php"
  • "mysite.com/about.php"

in the browser's address bar.

My question is, how can I rewrite/mask the URL so that while they are visiting the pages, they will see:

  • "mysite.com/"
  • "mysite.com/portfolio/"
  • "mysite.com/portfolio/001"
  • "mysite.com/about/"

respectively?

Thanks, really appreciate the help!

Alex

AlvaroAV
  • 10,335
  • 12
  • 60
  • 91
4lexcowley
  • 33
  • 3
  • 1
    possible duplicate of [PHP/.htaccess: removing php extension from url](http://stackoverflow.com/questions/18751890/php-htaccess-removing-php-extension-from-url) – r3mainer Nov 13 '14 at 20:27
  • Have you tried anything yourself?. – lxg Nov 13 '14 at 20:27
  • Yes, I've tried using this article:https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/ But it doesn't work – 4lexcowley Nov 13 '14 at 20:35
  • I saw that link squeamish, but I couldn't figure it out - it shows how to remove the .php, but I need to sometimes create two folders (portfolio/001) instead of just removing the extension – 4lexcowley Nov 13 '14 at 20:37

0 Answers0