1 Reply Latest reply on Jan 26, 2009 4:55 PM by Newsgroup_User

    BrowserManager AND Apache mod_rewrite

    john isaacks Level 1
      I have my flex project on a page that the real location is mydomain.com/mothers_rings_flex.php
      but I want to use mod_rewrite to pretty that url up a bit to instead look like mydomain.com/mothers-rings/

      Once I do that, I have to set a base tag in the header with an href of something like "mydomain.com/mothers_rings_flex.php" that way it will embed assets relative to "mydomain.com/mothers_rings_flex.php" and not relative to "mydomain.com/mothers-rings/" otherwise if I wanted to embed a file at mydomain.com/images/myimage.jpg with a relative url like src="images/myimage.jpg" then it would actually look for the asset in this absolute path: "mydomain.com/mothers-rings/images/myimage.jpg" But that base tag takes care of that.

      BUT whenever the BrowserManager initializes, it ALSO changes the url to be exactly what the base tag says. so instead of init() changing it to mydomain.com/mothers-rings/# it redirects it to mydomain.com/mothers_rings_flex.php# (or whatever is in the base tag).

      So it seems like the 2 can't co-exist?
      I know the easy answer would be, just use absolute paths when embedding assets, but the page is a template used through the entire website and can't be changed for the one page.

      So I am wondering if anyone has faced this issue and knows of a possible work around?

      THANKS!
        • 1. Re: BrowserManager AND Apache mod_rewrite
          Level 7

          "john isaacks" <webforumsuser@macromedia.com> wrote in message
          news:glkscq$hc2$1@forums.macromedia.com...
          >I have my flex project on a page that the real location is
          > mydomain.com/mothers_rings_flex.php
          > but I want to use mod_rewrite to pretty that url up a bit to instead look
          > like
          > mydomain.com/mothers-rings/
          >
          > Once I do that, I have to set a base tag in the header with an href of
          > something like "mydomain.com/mothers_rings_flex.php" that way it will
          > embed
          > assets relative to "mydomain.com/mothers_rings_flex.php" and not relative
          > to
          > "mydomain.com/mothers-rings/" otherwise if I wanted to embed a file at
          > mydomain.com/images/myimage.jpg with a relative url like
          > src="images/myimage.jpg" then it would actually look for the asset in this
          > absolute path: "mydomain.com/mothers-rings/images/myimage.jpg" But that
          > base
          > tag takes care of that.
          >
          > BUT whenever the BrowserManager initializes, it ALSO changes the url to be
          > exactly what the base tag says. so instead of init() changing it to
          > mydomain.com/mothers-rings/# it redirects it to
          > mydomain.com/mothers_rings_flex.php# (or whatever is in the base tag).
          >
          > So it seems like the 2 can't co-exist?
          > I know the easy answer would be, just use absolute paths when embedding
          > assets, but the page is a template used through the entire website and
          > can't be
          > changed for the one page.
          >
          > So I am wondering if anyone has faced this issue and knows of a possible
          > work
          > around?

          Why don't you just call it index.php, and then the URL would _be_
          mydomain.com/mothers-rings/