Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Rerouting directories in Apache2

Posted on 2007-04-04
2
Medium Priority
?
195 Views
Last Modified: 2012-05-05
I have recently changed the paths around on my web server and want to make the old paths automatically point to the new paths.

For example:

Old path: http://my.website.com/coolstuff/uploads
New path: http://my.website.com/uploads/coolstuff

I'm using Apache2, and want to avoid having to keep the old folders around since I moved them in the first place to mak everything a bit tidier. Any idead how I can achieve what I want easily?

0
Comment
Question by:Chisel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
JamesCssl earned 500 total points
ID: 18851258
In your .htaccess file in the root of you site, you can add the following lines:

RewriteEngine On
RewriteRule ^/?coolstuff/uploads(.*)$ /uploads/coolstuff$1 [R=301]

You could alternatively add them to your httpd.conf file if you wanted.
0
 

Author Comment

by:Chisel
ID: 18852460
Thankyou, that works perfectly =D
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question