|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I need some writing RewriteCond for ".net" to ".com" domaim redirect, i.e. all requests to "http(s)://www.ourdomain.nettld/someUrl" should be rewritten as "http(s)://www.ourdomain.comtld/someUrl". My idea was to do that as the following: <VirtualHost *> .... RewriteEngine On RewriteCond (.*)ourdomain\.net(.*) RewriteRule (.*) %1ourdomain\.com%2 .... </VirtualHost> However, Apache complains: RewriteCond: bad argument line '(.*)ourdomain\\.net(.*)' Any ideas? Thanks in advance |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
adf schrieb:
> I need some writing RewriteCond for ".net" to ".com" domaim > redirect, i.e. all requests to "http(s)://www.ourdomain.nettld/someUrl" > should be rewritten as "http(s)://www.ourdomain.comtld/someUrl". My > idea was to do that as the following: > > <VirtualHost *> > ... > RewriteEngine On > RewriteCond (.*)ourdomain\.net(.*) > RewriteRule (.*) %1ourdomain\.com%2 > ... > </VirtualHost> > > However, Apache complains: RewriteCond: bad argument line > '(.*)ourdomain\\.net(.*)' Try sometihing like: RewriteEngine On RewriteCond %{HTTP_HOST} ourdomain\.net [NC] RewriteRule ^/(.*) http://ourdomain.\com/$1 [R=301,L] B. -- BM Computer-Services, Bergmannstr. 66, 10961 Berlin Webdesign, Internet, Layout und Grafik Tel.: 030/20649400, mobil 0175/7419517, Fax: 030/20649401 Web: http://www.bmservices.de, eMail: kontakt@bmservices.de |
|
![]() |
| Outils de la discussion | |
|
|