> Assume I have an URL
>
> http://www.aaaaa.com/my/sub/path/
>
> resp.
>
> http://www.aaaaa.com/my/sub/path/index.html
>
> Now when a user enters the first or second URL he sould AUTOMATICALLY
> be redirected to the fowllowing URL:
>
> http://www.bbbbbb.com
>
> How can I achieve this at best?
s/at//
With a server-side redirect, e.g. in a .htaccess file:
RedirectMatch permanent ^/my/sub/path/(index\.html)?$ http://www.bbbbbb.com/
See also <http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirectmatch>
> Is redirection only possible be a placeholder index.html which contains
> a redirect statement or is there a server based instant redirection
> (=without first having to fetch the first index.html page) possible
Yes.
This has nothing to do with HTML or stylesheets at all.
Please choose your Newsgroups header more wisely in the future.
X-Post & F'up2 comp.infosystems.www.authoring.misc
PointedEars
>> http://www.aaaaa.com/my/sub/path/
[...]
> With a server-side redirect, e.g. in a .htaccess file:
Here "e.g." should be read as "depending on the server software and its
settings, but typically".
>> Is redirection only possible be a placeholder index.html which
>> contains a redirect statement or is there a server based instant
>> redirection (=without first having to fetch the first index.html
>> page) possible
>
> Yes.
I think that's a somewhat sarcastic response to an "or" question. The
correct answer is that it depends. Server-based redirection is not always an
option to an author.
In the case presented in the original question, it is probable that
server-side redirection is possible, since www.aaaaa.com is running
Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7a PHP/5.2.3, which supports
the .htaccess technique described, though it is possible that its use by
individual authors has been disabled (but this is not probable, as the site
has been set up just to sell the domain name).
It is quite possible that the original poster did not actually mean
www.aaaaaa.com, but then it's his problem that he got the right detailed
answer to the wrong question he asked. The morale is that people should use
the defined pseudo-domains like example.com when they give a dummy example
and not a real domain name.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
> On 10/3/2009 9:10 AM, Wladimir Borsov wrote:
>> Assume I have an URL
>>
>> http://www.aaaaa.com/my/sub/path/
>>
>> resp.
>>
>> http://www.aaaaa.com/my/sub/path/index.html
>>
>> Now when a user enters the first or second URL he sould AUTOMATICALLY
>> be redirected to the fowllowing URL:
>>
>> http://www.bbbbbb.com
>>
>> How can I achieve this at best?
>>
>> Is redirection only possible be a placeholder index.html which contains
>> a redirect statement or is there a server based instant redirection
>> (=without first having to fetch the first index.html page) possible?
>
> If your server is Apache, server-based redirection can be obtained with
> an .htaccess file in your Web space's root. You need the following
> commands: RewriteEngine, RewriteCond, and RewriteRule.
However, mod_rewrite is overkill for simple redirects like this, and not all
ISPs provide it; by comparison, mod_alias appears to be more readily
available.
Please trim your quotes to the relevant parts; usually do not quote sigs.
There is also something terribly wrong with your From header. Read RFC
1036, section 2.1.1, where it says "The 'From' line contains the electronic
mailing address of the person who sent the message, in the Internet
syntax.", and RFC 2822, section 3.4.1, where it says "A mailbox receives
mail."
See also:
- <http://www.netmeister.org/news/learn2quote.html>
- <http://www.interhack.net/pubs/munging-harmful/>
When I wrote my reply, I believed that the entire original message was
relevant. I still believe it.
RFC 3676 says that a signature should be preceeded by a line with
dash-dash-space, as is my signature below. If I reply to someone who
fails to abide by that RFC, it is not my job to compensate for his or
her failure.
Munged From addresses are more common than unmunged addresses. Munging
helps to reduce the flow of spam. My real address can be extracted by
humans from the Organization header of the message.
--
David E. Ross
<http://www.rossde.com/>.
Don't ask "Why is there road rage?" Instead, ask
"Why NOT Road Rage?" or "Why Is There No Such
Thing as Fast Enough?"
<http://www.rossde.com/roadrage.html>
When I wrote my reply, I believed that the entire original message was
> Munged From addresses are more common than unmunged addresses.
On Usenet, only in some circles of people who misbehave.
But thank you for expressing so clearly (and twice at that) that you
intentionally ignore Usenet conventions.
Please keep using the same forged From field until you get a clue. However,
you are allowed to change it once, to add the recommended .invalid
pseudo-domain, even though people will then need to killfile you twice.
--
Yucca, http://www.cs.tut.fi/~jkorpela/