ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] mod_rewrite and ?
@ 2007-05-03  8:30 Aleksey E. Birukov
  2007-05-06 22:05 ` Michael Shigorin
  2007-05-08 12:38 ` Alexey I. Froloff
  0 siblings, 2 replies; 4+ messages in thread
From: Aleksey E. Birukov @ 2007-05-03  8:30 UTC (permalink / raw)
  To: Community

Пытаюсь написать правило для редиректа от старых динамических урлов на новые 
статические. Проблема в экранировании знака вопроса. Странно, что 
экранировать его обратным слэшем не выходит.
Проблема именно в нем - если его убрать (из .htaccess и из URL), то правило 
работает.

RewriteRule ^product_info.php\?(.*)products_id=([0-9]+) p-$1.html [R]

Помогите кто знает, уже 3 часа убил :(

rpm -q apache
apache-1.3.37rusPL30.22-alt9

-- 
$respect

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] mod_rewrite and ?
  2007-05-03  8:30 [Comm] mod_rewrite and ? Aleksey E. Birukov
@ 2007-05-06 22:05 ` Michael Shigorin
  2007-05-08 12:38 ` Alexey I. Froloff
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Shigorin @ 2007-05-06 22:05 UTC (permalink / raw)
  To: Community

On Thu, May 03, 2007 at 12:30:33PM +0400, Aleksey E. Birukov wrote:
> Помогите кто знает, уже 3 часа убил :(

http://www.mod-rewrite-wizard.com/

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] mod_rewrite and ?
  2007-05-03  8:30 [Comm] mod_rewrite and ? Aleksey E. Birukov
  2007-05-06 22:05 ` Michael Shigorin
@ 2007-05-08 12:38 ` Alexey I. Froloff
  2007-05-15 22:21   ` Michael Shigorin
  1 sibling, 1 reply; 4+ messages in thread
From: Alexey I. Froloff @ 2007-05-08 12:38 UTC (permalink / raw)
  To: ALT Linux Community

[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

* Aleksey E. Birukov <birukov@> [070503 12:32]:
> RewriteRule ^product_info.php\?(.*)products_id=([0-9]+) p-$1.html [R]

"product_info.php" - это %{SCRIPT_FILENAME}, а "products_id=" -
часть %{QUERY_STRING}, в RewriteRule оно не учитывается.

RewriteCond %{QUERY_STRING} products_id=([0-9]+)
RewriteRule ^product_info.php$ p-%1.html [R]

-- 
Regards, Alexey I. Froloff
AIF5-RIPN, AIF5-RIPE
-------------------------------------------
  Inform-Mobil, Ltd. System Administrator
       http://www.inform-mobil.ru/

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Comm] mod_rewrite and ?
  2007-05-08 12:38 ` Alexey I. Froloff
@ 2007-05-15 22:21   ` Michael Shigorin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Shigorin @ 2007-05-15 22:21 UTC (permalink / raw)
  To: ALT Linux Community; +Cc: sysadmins

On Tue, May 08, 2007 at 04:38:29PM +0400, Alexey I. Froloff wrote:
> > RewriteRule ^product_info.php\?(.*)products_id=([0-9]+) p-$1.html [R]
> "product_info.php" - это %{SCRIPT_FILENAME}, а "products_id=" -
> часть %{QUERY_STRING}, в RewriteRule оно не учитывается.
> RewriteCond %{QUERY_STRING} products_id=([0-9]+)
> RewriteRule ^product_info.php$ p-%1.html [R]

Кстати, нашлось тут rewritewiki (искал своё):
http://rewrite.drbacchus.com/rewritewiki/VirtualHost

(для sysadmins@ продублирую и ссылку
на http://www.mod-rewrite-wizard.com/)

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-15 22:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-03  8:30 [Comm] mod_rewrite and ? Aleksey E. Birukov
2007-05-06 22:05 ` Michael Shigorin
2007-05-08 12:38 ` Alexey I. Froloff
2007-05-15 22:21   ` Michael Shigorin

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git