Solved

Rerouting directories in Apache2

Posted on 2007-04-04
2
193 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 125 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

615 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