Jump to content

Should I url re-write?


Mal1

Recommended Posts

Our two main websites are php driven mysql e-commerce sites. The way they work is everything seems to rug off the index.php and be pulled into the site's layout/template. Sorry, I don't know what you call this...

 

Content pages are created as php (.tpl) files but need to be added as cases to the index.php file and search results are generated and placed into the layout of the site when relevant.

 

The result is page urls that look like this:

 

http://www.little-persia.com/?action=rug_delivery (static page)

 

http://www.little-persia.com/?action=search&keywords=kashan&x=0&y=0 (dynamically generated search page)

 

 

What should be done with this? Is it acceptable practise or should some sort of re-writing be done (or something else).

 

From a SEO point of view I'm not sure what should be done... on the one hand the websites are fairly established and changing the way the url reads would mean many external inwards links would be broken, on the other I'd imagine having the url read http://www.little-persia.com/rug_delivery or http://www.little-persia.com/rug_search/kashan would be much more search engine friendly.

Link to comment
Share on other sites

URLs don't matter as much as some people think. Rearranging the data into a different form (?action=rug_delivery to /rug_delivery) won't give as much an improvement as if you were adding new data (?node=123 to /123/rug_delivery). That said it's still a good idea to do it.

 

The underlying structure is decent enough, and the idea of running everything through one file (in one form or another) is pretty standard. If you arranged files in a certain way you could probably do away with switch statements in favor of dynamically locating files to run - ?action=rug_delivery could map to /pages/rug_delivery.php - but you'd need to make very sure that's done safely.

Eventually the site will grow to a point where you'll feel it necessary to redo things. That's good. When that time comes you'll have a better understanding of how the site needs to operate and can rebuild all the new stuff you've come up with in a more "proper" way.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.