benos Posted February 6, 2013 Share Posted February 6, 2013 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. Link to comment Share on other sites More sharing options...
chowellacsbd Posted February 6, 2013 Share Posted February 6, 2013 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. 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 More sharing options...
chowellacsbd Posted February 6, 2013 Share Posted February 6, 2013 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. 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 More sharing options...
Mapzter Posted February 6, 2013 Share Posted February 6, 2013 One way to do it, assuming your webserver is Apache: in a .htaccess file: RewriteEngine On RewriteRule ^/store/testdirectory http://www.brianenos.com/store/announcement.html Link to comment Share on other sites More sharing options...
benos Posted February 8, 2013 Author Share Posted February 8, 2013 Is the htaccess file responsible for the error message you see when you try to access a webpage that is not on the server, like this: http://www.brianenos.com/pages/dillonfaqs1.html Link to comment Share on other sites More sharing options...
StraightUp_OG Posted February 9, 2013 Share Posted February 9, 2013 No http status codes are issued by your Apache web server. Link to comment Share on other sites More sharing options...
StraightUp_OG Posted February 9, 2013 Share Posted February 9, 2013 (edited) 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 February 9, 2013 by StraightUp_OG Link to comment Share on other sites More sharing options...
benos Posted February 12, 2013 Author Share Posted February 12, 2013 Thanks for the info StraightUp_OG! Link to comment Share on other sites More sharing options...
StraightUp_OG Posted February 12, 2013 Share Posted February 12, 2013 My pleasure! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now