Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detecting URL rewrites (SEO urls)

How could a client detect if a server is using Search Engine Optimizing techniques such as using mod_rewrite to implement "seo friendly urls."

For example:

Normal url: http://somedomain.com/index.php?type=pic&id=1

SEO friendly URL: http://somedomain.com/pic/1

like image 919
rook Avatar asked Dec 17 '22 17:12

rook


1 Answers

Since mod_rewrite runs server side, there is no way a client can detect it for sure.

The only thing you can do client side is to look for some clues:

  • Is the HTML generated dynamic and that changes between calls? Then /pic/1 would need to be handled by some script and is most likely not the real URL.
  • Like said before: are there <link rel="canonical"> tags? Then the website likes to tell the search engine, which URL of multiple with the same content it should use from.
  • Modify parts of the URL and see, if you get an 404. In /pic/1 I would modify "1".
    If there is no mod_rewrite it will return 404. If it is, the error is handled by the server side scripting language and can return a 404, but in most cases would return a 200 page printing an error.
like image 87
JochenJung Avatar answered Jan 03 '23 11:01

JochenJung