You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ebbe Hjorth <in...@ebbehjorth.dk> on 2007/08/25 14:09:02 UTC

[users@httpd] redirecting nonexcisting subfolders

Hi,

I am running an apache 2.2 on a freebsd server, and would like to redirect
users from ex. xxx.dk/1234 to xxx.dk - how can i do that? is that a server
setup? or can i do that from a php script? because now when i type
xxx.dk/1234 i get a "page not found" error.


Thanks in advance, Ebbe



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] redirecting nonexcisting subfolders

Posted by Vincent Bray <no...@gmail.com>.
On 25/08/07, Ebbe Hjorth <in...@ebbehjorth.dk> wrote:
> Hi,
>
> I am running an apache 2.2 on a freebsd server, and would like to redirect
> users from ex. xxx.dk/1234 to xxx.dk - how can i do that? is that a server
> setup? or can i do that from a php script? because now when i type
> xxx.dk/1234 i get a "page not found" error.

It would help to have an explaination of purpose. If you just want 404
errors to get redirected to the home page (not generally a great
idea), then:

ErrorDocument 404 http://xxx.dk/

Otherwise if these nonexistent 'folders' have a meaning, and you're
trying to use that meaningful URL in a script, see:

http://wiki.apache.org/httpd/RewriteVirtualHandler

-- 
noodl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org