You are here: Re: rewriting URLs, part II -- 301 redirect from old dynamic URLs « All PHP « IT news, forums, messages
Re: rewriting URLs, part II -- 301 redirect from old dynamic URLs

Posted by web_design on 07/31/05 18:52

> -----------------------------------------------------------------------
> # This part works:
> RewriteEngine On
> RewriteRule ^(.+)(\.htm)$ /index.php?p=$1 [L]
>
> # This is the part that doesn't work:
> RedirectMatch 301 /index.php?p=(.*)$ http://www.mywebsite1234.com$1.htm
-------------------------------------------------------------------------------------
I'm wondering:

Is the [L] a problem?
Should the ? in the RedirectMatch be escaped by a backslash?
Do I need an [R] somewhere?
Do I need to escape all my periods with backslashes?

I'm experimenting with these but haven't had any luck yet. I also added a
forward slash, which was recommended to me, so it looks like this now:
RedirectMatch 301 /index.php?p=(.*)$ http://www.mywebsite1234.com/$1.htm

 

Navigation:

[Reply to this 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

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