|
-
Jan 10th, 2005, 02:24 PM
#1
Thread Starter
Member
htaccess to change URLs on the fly?
Hello everyone.
I'm trying to do something with .htaccess files, and I thought that someone here might have an idea about this.
I have a website, currently located in the server root, which links to it's images and pages using direct URLs like /images/logo.png and /section/page.html . However, I want to move that site to a subdirectory, yet keep the links in working order without having to change them. What I would need is some sort of .htaccess file located in the site's new subdirectory that would modify the links of the page to keep them all relative to the subdirectory instead of the root. For example, links like /images/logo.png should be automatically converted by Apache to something like /old/images/logo.png (notice the added /old/ part). It's probably possible, I just don't know how (the doc on mod_rewrite is pretty dense). I don't know either if I'm clear in my explanations, so feel free to ask if you don't understand.
Can anyone help?
- Dr. Cossack
Interordi.com: Internet tools, programming, games, and more!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|