How to make an invalid URL with a person's name redirect to another page

C

cleeseely

A co-worker (call her Jane Doe) received a mailer with a link like
http://www.somewebsite.com/jane.doe. She thought that was pretty
clever marketing and wants me to create something similar on our
company's web site but not have to actually have folders with people's
names, so a link like the one above would be invalid.

Does anyone know if there is a way to redirect an invalid URL like that
to some other page without displaying errors?
 
R

Ronx

Use a custom 404 error page, with some server-side scripting to detect
the error page and redirect to the correct page.

How you implement this depends on your host, and what the server
supports.
 
C

cleeseely

Our site is on an Apache server and I think I can use directives in a
..htaccess file to redirect. I have been able to redirect to another
URL if I just enter the address of a folder on the site, but have not
been able to figure out how to make it redirect if an invalid filename
in that folder is in the address. The syntax I'm using is similar to:
Redirect /test http://www.websitename.com/test2

Does anyone know if this can be done with a .htaccess file and, if so,
what the syntax would be?

Thanks,
Cliff
 
M

Mike Mueller

Is that the exact syntax of the url , or could it be
something like
http://www.somewebsite.com/?name=Jane.Doe

The ?name= would be a query string, and the default page
would likely have some type of scripting on it to read the
name and customize the page to the user


:A co-worker (call her Jane Doe) received a mailer with a
link like
: http://www.somewebsite.com/jane.doe. She thought that was
pretty
: clever marketing and wants me to create something similar
on our
: company's web site but not have to actually have folders
with people's
: names, so a link like the one above would be invalid.
:
: Does anyone know if there is a way to redirect an invalid
URL like that
: to some other page without displaying errors?
:
 
C

cleeseely

The users will have to type the url in themselves so I want to make it
as easy as possible. I was able to get it to go to the page I wanted
regardless of what they type after the folder name with the .htaccess
file. Thanks for the input.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top