-2

I have a small social media website that I've created myself. I'm using PHP for the backend, but I'm having a problem. The posts that the users create have unique id's and I have a page where I pass the unique id to, and it'll go and get the page. It works with no problems.

My problem is that Google doesn't recognize that. I have the exact same thing for the users profiles. Is there a way to fix this? Or should I create a directory for every user with his/her posts in it and his page?

BSMP
  • 4,596
  • 8
  • 33
  • 44
mnsh111
  • 1
  • 3
  • Welcome to SO. Please read [What topics can I ask about](http://stackoverflow.com/help/on-topic) and [How to ask a good question](http://stackoverflow.com/help/how-to-ask) And [the perfect question](http://codeblog.jonskeet.uk/2010/08/29/writing-the-perfect-question/) SO is **not a free coding or tutorial or library finding service** You have to show that you have made some effort to solve your own problem. – RiggsFolly May 09 '16 at 20:28

1 Answers1

0

Have a look at mod_rewrite when using apache as web server. Most shared hoster (I know) provide this and let you use it with a .htaccess file.

Another, not that "nice" but working, way is extending a php script virtually, for example: http://domain.tld/profile.php/user123456

Search engines should recognise this as ordinary file. You can find that "extension" using a $_SERVER property.

Nice to read: http://warpspire.com/posts/url-design/

clemens321
  • 2,103
  • 12
  • 18