2 Replies - 679 Views - Last Post: 28 August 2010 - 02:02 PM

#1 Fratyr  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 139
  • Joined: 10-April 08

Apache 2.2 Question - rewrite all URLs

Posted 26 August 2010 - 12:53 AM

Hello,

Haven't found related forum section for this one, so I'll try to ask here.

Is it possible to:
I have a website, f.e www.domain.com, which works perfect, now on the development staging, I have SVN revisions deployed by Hudson (copies of website with different version), to access them, I use GET parameter "rv". www.domain.com/?rv=1.25.26
What I want now, is to know If it's possible at all, on the server side (Apache) upon request that has GET "rv" param, append to all files/styles/objects/javascripts or hrefs calling the "rv" version.

A bit messy? :) Alright.

This is my css/js import:
<link type="text/css" rel="stylesheet" href="?css=style"/>
<script type="text/javascript" src="?js=ajax&common&jquery"></script>

When I visit www.domain.com/?rv=1.25.26, I want apache to take this parameter and do this:

<link type="text/css" rel="stylesheet" href="?css=style&rv=1.25.26"/>
<script type="text/javascript" src="?js=ajax&common&jquery&rv=1.25.26"></script>

And for the rest as well. Javascripts, images, URLs(href), flash objects etc..

Is it possible? If yes, please point me to the right manual. Thanks.

Is This A Good Question/Topic? 0
  • +

Replies To: Apache 2.2 Question - rewrite all URLs

#2 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5322
  • View blog
  • Posts: 27,232
  • Joined: 10-May 07

Re: Apache 2.2 Question - rewrite all URLs

Posted 26 August 2010 - 01:03 AM

** Topic moved to Web Servers & Hosting **
Was This Post Helpful? 0
  • +
  • -

#3 level1  Icon User is offline

  • D.I.C Head

Reputation: 14
  • View blog
  • Posts: 65
  • Joined: 12-June 08

Re: Apache 2.2 Question - rewrite all URLs

Posted 28 August 2010 - 02:02 PM

I think you could do something like this with .htaccess. See if this intro to htaccess gets you anywhere.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1