Solved

Rerouting directories in Apache2

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

822 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