This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
Common Questions (Forum Locked Forum Locked)
 Helicon Tech : Common Questions
Subject Topic: Newbie question for a CMS system (Topic Closed Topic Closed)
Author
Message |
kheops2303
Newbie


Joined: 10 March 2008
Posts: 5
Posted: 10 March 2008 at 10:19am  

Hello,

Sorry for disturbing, but i'm very newbie and I don't understand the rules.

My project: build a cms system for mutliple sites (thus multiple domains).

Two problems:

1) All the url should be redirected to a sinlge .asp script that will make the job with the database. Thus, for this I need to trap the typed url that will serve me to search in the db

2) the images directories should be virtually /images for all domains but physycally it has to be redirected to different physical path.

So:

any http://mydomain/path1/path2/script1.asp should be redirected to /main.asp .  main.asp should "trap" the typed url to serach into the database for a primary key = "/path1/path2/scrip1.asp"

any http://mydomain/images/logo.jpg should be redirected to http://mydomain/mydomain/images

Thanks for helping me to start

Bye

Back to Top
 
Lexey
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Posts: 8119
Posted: 10 March 2008 at 1:36pm  

1) RewriteRule [^?]+\.asp(\?.*)? /main.asp$1 [I,L]

And original URI could be taken from X-Rewrite-URL header.

2) I do not understand your requirements for that task. Try to expand them (for example with real URL samples).
Back to Top
 
kheops2303
Newbie


Joined: 10 March 2008
Posts: 5
Posted: 11 March 2008 at 2:16am  

Hello,

Thanks for your quick help. The first point works fine althought I don't understand the syntax.

i hade tried : RewriteRule . /main.asp , this worked too but it looks too simple, probably this was not right

About the second point with images:

I would like to build a CMS for multiple domains but all will be listened by one only single "website" into IIS6.0. So I will not use what they call "header translation"

The problem is thus that the images folder would be mixed for all domains, which i cannot accept.

Exemple: 2 url

<img src="/images/logo.jpg">  this is written into a asp page for exemple at http://www.domain1.be/blabla.asp  (that is now perfectly rewritte)

and : <img src="/images/logo.jpg"> but this is written into http://www.domain2.be/blabla.asp

So I try to have a uri transformation on the fly in order to point to different respectives folders

in this case : the first should fetch "/images/www.domain1.be/logo.jpg" and the second should fetch "/images/www.domain3.be/logo.jpg"

So images will not be mixed between domains, and my users using the cms will have a tool to manage their images folder witjout seeing others users images.

I speak here about images but this need to work also for other "resource" : favicon (different per domain), flash objects, ...

I don't know if it is clear enought, english is not my motherlanguage.

Thanks for your help.

 

Back to Top
 
kheops2303
Newbie


Joined: 10 March 2008
Posts: 5
Posted: 11 March 2008 at 12:07pm  

Hello again,

I'm back with a small question about point 1:

The redirection works fine IF the url is complete including the script name. But what about the default script per folder?

http://www.domain1.be/index.asp works fine because the rule detectes the .asp at the end

http://www.domain1.be don't work, altought in IIS the default document is index.asp

And it is the same in every sub folder.

Thanks for your help

Best regards from rainy belgium

Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum