[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Rewrite engine problem



RewriteRule ^(.*)$              /test/$1
AliasMatch ^/~([^/]+)(/(.*))? /temp/$3

I can answer both your questions, because I only just found out a few weeks
ago.
The rewrite rules in the httpd.conf make it so everything goes back to
http://www.yourdomain.com
Say you have an alias http://www.otherdomain.com, notice when you type into
your browser it redirects to http://www.yourdomain.com ?
Or if you type in  http://yourdomain.com it adds the "www" onto it ? It's
rewriting things.

I actually deleted this rewrite rule with no problem. I set up wildcarded
dns so I could use any subdomain I wanted to. Ie: if i typed
http:///wateva.mydomain.com
it would actually KEEP this URL, instead of rewriting ( like the rules above
do ) to http://www.mydomain.com

Now... The code you have below. I'm not really familliar with coding etc.
But I would use this, it works for me:

RewriteRule ^(.*)$              /test/$1
AliasMatch ^/~([^/]+)(/(.*))? /temp/$3

Hope I've helped.

Regards,

Kai.

-----Original Message-----
From: cobalt-users-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Tomás García
Ferrari
Sent: Sunday, 10 March 2002 7:10 AM
To: Cobalt Users
Subject: [cobalt-users] Rewrite engine problem


Hello,

I'm facing a problem. I have to add a 'RewriteRule' to a virtual server on
our RaQ and I found out that the RaQ is already using the Rewrite engine
(doing something that I don't fully understand...) If I try to add an extra
RewriteRule to the configuration, the whole server stops working...

Here is the original one:
---
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^my.ip.num.ber(:80)?$
RewriteCond %{HTTP_HOST}                !^my.host.name(:80)?$
RewriteRule ^/(.*)                      http://my.host.name/$1 [L,R]
RewriteOptions inherit
---

I don't understand why is this rule needed... Is just rewriting everything
directly to itself? And if I add an extra RewriteRule, before this one
(supose that I have to move /test to /temp, my rule would say:
    RewriteRule ^/test/(.*)$ /temp/$1 [R]
), it doesn't work!

Any ideas?

Regards,
Tomás

+--                                --+
    Tomás García Ferrari
    Bigital
    http://bigital.com/
+--                                --+

_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users