Jump to content
Brian Enos's Forums... Maku mozo!

url redirect question... calling all web geeks...


Recommended Posts

Say I wanted to have some sort of redirect in place on my server, that would make any link (from a group of maybe 50 pages) that the url began with, for example:

"http://www.brianenos.com/store/testdirectory"

... redirect to one page, such as, for example:

"http://www.brianenos.com/store/announcement.html"

I have no idea where to even begin.

:o

Link to comment
Share on other sites

Say I wanted to have some sort of redirect in place on my server, that would make any link (from a group of maybe 50 pages) that the url began with, for example:

"http://www.brianenos.com/store/testdirectory"

... redirect to one page, such as, for example:

"http://www.brianenos.com/store/announcement.html"

I have no idea where to even begin.

:o

You would need to have an .htaccess file at the top level of your servers root directory. An .htaccess file is a hidden file that executes top level commands such as forwarding an entire domain, specific pages, etc.

Link to comment
Share on other sites

Say I wanted to have some sort of redirect in place on my server, that would make any link (from a group of maybe 50 pages) that the url began with, for example:

"http://www.brianenos.com/store/testdirectory"

... redirect to one page, such as, for example:

"http://www.brianenos.com/store/announcement.html"

I have no idea where to even begin.

:o

You would need to have an .htaccess file at the top level of your servers root directory. An .htaccess file is a hidden file that executes top level commands such as forwarding an entire domain, specific pages, etc.

Also, what you'll need to know is that .htaccess files are invisible on most machines so you'll need to create and edit that file directly on your server using something like Coda (www.panic.com), which is what we use everyday to design and build sites for clients. Make sure you're able to view "invisible files" though.

WARNING... .htaccess files are VERY powerful and can be detrimental if not utilized properly.

Link to comment
Share on other sites

As far as the 301/302 (redirect) you could also create a php page and just use headers such as this:

header('HTTP/1.1 301 Moved Permanently');

header('Location: http://www.example.com/');

exit();

This shows 7 methods for issuing 3xx codes http://www.yolinux.com/TUTORIALS/ApacheRedirect.html

Edited by StraightUp_OG
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...