Reply to Re: modrewrites (different rewrites but same destination - is this possible) ?

Your name:

Reply:


Posted by Marco Zilotti on 12/20/05 20:35

no no, the rule

RewriteRule ^([^/]+)\ps2(.*).html$ pdisplay.php?page=p2/$1&type=htm

is correct, because you have added the 'ps2' before (.*).html (that is
'1 more check in the rewrite rule' of my previous post. Excuse me for
my bad english, i'm italian :D )

When apache look for a page, example
http://www.domain.com/g2antigrav.html

it find that both rules match :

RewriteRule ^([^/]+)\.html$ pdisplay.php?page=p2/$1&type=htm
RewriteRule ^([^/]+)\.html$ gdisplay.php?page=g2/$1&type=htm

but the first rule is follow.

In that rule
RewriteRule ^([^/]+)\ps2(.*).html$ pdisplay.php?page=p2/$1&type=htm

http://www.domain.com/g2antigrav.html doesn't match, because the name
of the page doesn't start with ps2, so the rule is ignored.

with

RewriteRule ^([^/]+)\g2(.*).html$ pdisplay.php?page=g2/$1&type=htm

the url http://www.domain.com/g2antigrav.html match because the name of
the page starts with g2.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация