Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Notice removed Reward existing answer by William
Bounty Ended with kapn's answer chosen by William
Tweeted twitter.com/#!/ServerFault/status/192479202199601152
Notice added Reward existing answer by William
Bounty Started worth 50 reputation by William
corrected title
Link

How can I have a director on my server redirect to a different directory Directory Redirect on my server?Apache Server

Source Link

How can I have a director on my server redirect to a different directory on my server?

I downloaded a simple PHP blogging template called sphpblog and put it on my server. The blog is accessed through classlibrary.org. This domain redirects to the folder /other/william/classlibrary on the server. I can visit the homepage of the blog, and it displays just fine. However, when I try to click links, the links go to classlibrary.org/other/william/classlibrary/linkname.extension, which results in a 404 error. I checked the preferences for the blog and there is no option to have it direct to the root directory of the website. So, I would like to have any link going to classlibrary.org/other/william/classlibrary/filename.extension redirect to classlibrary.extension.

Rather then creating seperate html files for each file on the server, which would take a while, can I somehow do this through a .htaccess file? My server is running PHP version 5.2, and the full path classlibrary.org redirects to is /home/content/r/t/e/rteder10/other/william/classlibrary. I don't have access to the administrator control panel or access or the server itself. It is Godaddy Linux Hosting. Any help will be greatly appreciated.