0

Possible Duplicate:
using apache’s mod_rewrite to parse SEO friendly URL’s

I am building a site and I am using MVC concepts to dynamically load content. Basically I have a single file, index.php, and distribute the request to the appropriate controller.

So the url "siteurl.com/post would redirect to siteurl.com/index.php?ctrl=post and then the post controller would load the appropriate page.

My question is, is this going to be bad for SEO since I route everything through one page? Is there a better way to do this?

Community
  • 1
  • 1

2 Answers2

1

No, it is not bad. You're rewriting, not redirecting. The client (crawlers included) has no idea what is going on server-side, and doesn't care. Clients think they are on the URL they are on your friendly URL.

I recommend using a tool, such as Fiddler or Wireshark, to look at the raw HTTP traffic to fully understand what is going on.

Brad
  • 159,648
  • 54
  • 349
  • 530
  • Ok thanks. So it just sees it as a bunch of separate sites – user1846761 Dec 15 '12 at 23:05
  • 1
    @user1846761, It sees a bunch of different URLs. Whether they are "different sites" or not depends on your page's content. Search engines aren't too fond of sites that have 100 pages with identical content. Be sure to serve identical content only from one URL, and use canonical URLs when this isn't reasonable. – Brad Dec 15 '12 at 23:06
  • @user1846761 - MVC's are (always?) inward funnels. Your users see nifty urls like `http://home.com/decor/living/lamps/modern/`, whereas your *server* software (not PHP) intercepts the requested URL (see that one I just gave you?) as it comes into the system and *rewrites the path* so it acts like `http://home.com/storefront.php/decor/living/lamps/modern/`, which then PHP gets a ahold of and goes to work. It's going on *inside*. And for SEO, having meta keywords in the URL is good. – Jared Farrish Dec 15 '12 at 23:14
  • What's with the downvote? If you're going to downvote an answer, leave an explanation for everyone's benefit. – Brad Dec 15 '12 at 23:20
0

No, in fact is the way most frameworks do their job. The pattern you are using is called Front controller pattern and does exactly that so don't worry about your SEO. If you want prettier URL's you can always use Apache's mod_rewrite.

Regards

LuisClemente
  • 385
  • 2
  • 11