I wish to do URL spinning of my web page. You will find 2 types of links possible on a single page the following:

Pagination: http://www.xxxxx.com/dictionnaire.php?page=4 That I wish to seem like this: http://www.xxxxx.com/dictionnaire/p4

Word: http://www.xxxxx.com/dictionnaire.php?idW=675&word=Resto-basket That I wish to seem like this: http://www.xxxxx.com/dictionnaire/675/Resto-basket

Within the .htaccess, I've the next:

RewriteRule    ^dictionnaire/p([0-9]+)?$    dictionaire.php?page=$1    [NC,L]    
RewriteRule    ^dictionnaire/([0-9]+)/([a-z])?$    dictionaire.php?idW=$1&word=$2   [NC,L]

QUESTIONS:

  1. Is the very best google friendly method of carrying this out? (mostly for that word link, or perhaps is there better?)
  2. Are you able to have 2 rewrite rules for just one link? Like above?
  3. Can there be a mistake during my code, is really, help.
  4. After I produced this code, my CSs and pictures were not showing up. Are you able to assist me to repair it?

I understand it is a lengthy question, however i thought it might be simpler this way.

Thank for that help.

  1. This ought to be "Google friendly".
  2. Yes, rewrite rules are used in order the moment one matches and replaces the URL, it's unlikely any more ones will match (since they will be focusing on the changed Link to the prior one).
  3. Looks OK in my experience. You can allow it to be into one rule though, should you permitted the destination Web addresses to become a quite different (to both use page= instead of idW= around the second one).
  4. Like the browser will request for assets in accordance with the non-rewritten URL (it obviously does not learn about what's happening behind the curtain). You will need to use absolute Web addresses for the images and CSS (or else, use ../ within the Web addresses, or increase the rewrite rules for the assets to ensure they are work).

Hope that can help.

EDIT: Sorry, since you obtain that [L] in the finish of the rules, it'll quit to complement anymore rules once it matches one. This will not have practical effect within this situation.

  1. Is the very best google friendly method of carrying this out? (mostly for that word link, or perhaps is there better?) Well, you can put page4 within the Pagination part, either will not really affect it much. For that Word page, why have you got it find words by IDs rather than the particular word? the termEquals(WORD) does not really appear to complete anything whatsoever. Possibly remove ID entirely and also have it search by word to ensure that it may be dictionnaire/word/(WORD) rather.
  2. Are you able to have 2 rewrite rules for just one link? Like above? Yes, it's totally easy to convey more than 2 rewrite rules (Think many forums which do this)
  3. Can there be a mistake during my code, is really, help. I've not looked hard, however it does not seem to be any errors.
  4. After I produced this code, my CSs and pictures were not showing up. Are you able to assist me to repair it? The issue here's it's searching /dictionnaire/p4/css.file.css for the css file. It is not searching inside your root directory like I guess you would like. Place the direct root for your CSS file beginning having a / at the start.