Mobile app version of vmapp.org
Login or Join
Sherry384

: Hmm, there's several problems when you do this. First of all, the real url of the page that is navigated to is not in the original page. Having a page.php?location=Home (where page.php processes

@Sherry384

Hmm, there's several problems when you do this.

First of all, the real url of the page that is navigated to is not in the original page. Having a page.php?location=Home (where page.php processes your query and redirects to location) for all your links makes people only see the page.php url. I'm not sure how many people actually look at what url they're visiting, but it could be confusing if people see that all links point to the same page. Some websites do this for outgoing links and it always really annoys me I can't see the destination of the link in one glance.

Of course CMS'es like Joomla and MediaWiki do this by default (index.php?id=1) but it's generally accepted that clean urls with no parameters have both better usability and better Google indexing.

Concerning search engines, of course there's the PHP header that can help out. You can just use a 301 redirect code in your header before sending it: phpprogrammingguide.blogspot.com/2005/11/php-header-301-redirect-moved.html
That way search engines will associate page.php?location=Home with /home/, ditto for all other pages. You could even go as far as to install Google Webmaster tools and manually point out which of the parameters should be ignored and which shouldn't (location obviously shouldn't be ignored as it lets Google tell apart the different internal links).

Also, adding a rel="canonical" in the pages will help search engines recognize what url should be which. Even if they end up on a page with ?location=x having a canonical url with /x/ will make sure that the right url is indexed.

Another problem is going to be the browser's back button. This is the most used button on the internet, and it won't work on your site if you use this script. Clicking back will take a user to the page.php page and just redirect them forward again, causing much irritation at the user's side and wrong stats at your side.

Last of all, it's really really important not to have page.php break. Sometimes it just happens that a link or page breaks for whatever reasons. One broken page in your site is annoying, but if page.php break ALL internal links are defunct. You could prevent this by letting the script email you as soon as someone encounters an error or whatever, but just be careful.

All in all I'd avoid it if you can do it any other way. There's work-arounds for search engines but it'll hurt your usability no matter what.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Sherry384

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme