Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 3.0 support forum
 Helicon Tech : ISAPI_Rewrite 3.0 support forum
Subject Topic: Display the domain name Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
SoaresS
Newbie
Newbie


Joined: 15 July 2008
Location: France
Online Status: Offline
Posts: 4
Posted: 15 July 2008 at 11:36am | IP Logged Quote SoaresS

Hello,
I'm a newbie and I'm testing ISAPI_Rewrite 3.
I want to have only one URL for all of my pages.

I want to display something like : http://www.monsite.fr/MyFolder
when we click on a link like : http://www.monsite.fr/Myfolder/MyFile.aspx?id=12345.

Is it possible to do this with ISAPI_Rewrite?
I look for various solutions throw the forum but I don't succed to find.

Thanks for hemping me.


Edited by SoaresS - 15 July 2008 at 12:54pm
Back to Top View SoaresS's Profile Search for other posts by SoaresS
 
Anton
Moderator Group
Moderator Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 3873
Posted: 16 July 2008 at 2:35am | IP Logged Quote Anton

It's not possible to have one substitution string for all url as in such case ISAPI_Rewrite won't know where actually it should direct the user.
You may try to use the following config (if it is suitable for you) with the urls like Myfolder/12345:

RewriteBase /
RewriteCond %{QUERY_STRING} ^id=(\d+)$
RewriteRule ^Myfolder/Myfile\.aspx$ Myfolder/%1 [NC,R]
RewriteRule ^Myfolder/(\d+)$ MyFile.aspx?id=$1 [NC,L]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
SoaresS
Newbie
Newbie


Joined: 15 July 2008
Location: France
Online Status: Offline
Posts: 4
Posted: 16 July 2008 at 3:30am | IP Logged Quote SoaresS

Thanks for this solution, I'll propose this way to do.
I'd never have found out the good syntax to do this.
But, I think I have to find another way to do this because i need to hide the parameters but they want to see only the domain name (or with the folder) AND they don't want to use iframe.

Thanks a lot !

Regards.
Back to Top View SoaresS's Profile Search for other posts by SoaresS
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 331
Posted: 16 July 2008 at 4:14am | IP Logged Quote Vyacheslav

Hi SoaresS!

Please don't worry. Maybe there are some solution for you. Please tell me:
1) Is MyFolder really existing folder, which contains MyFile.aspx, or not?
2) Do you want to use different file names, like myfile1.aspx and myfile2.aspx, or single file, like index.aspx ?

Tell, and we will try to help you.

__________________
Kind regards!
Vyacheslav.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
SoaresS
Newbie
Newbie


Joined: 15 July 2008
Location: France
Online Status: Offline
Posts: 4
Posted: 17 July 2008 at 3:08am | IP Logged Quote SoaresS

Hi Vyacheslav !
Yes for question 1 and 2 (no index.aspx)
We are asked to show only an URL like : http://mydomainName.com/.
But, in fact we have a folder with a file :
    http://mydomainName.com/MyFolder/myFile.aspx
    (http://mydomainName.com/MyFolder2/myFile2.aspx)

when we click on a link, we have a new page like :
    http://mydomainName.com/MyFolder/myFile.aspx?id=1245
    (http://mydomainName.com/MyFolder2/myFile2.aspx?id=6789)
There are 20 other folders with the same mechanism.
The most important is to hide the parameters.
So I suppose they'll accept if we display the folder if it's an easier way to do.
I thought I'd have to write 20 rules based on the same syntax, one for each folder. But my first problem is not solved : hide the id parameter.

Thanks again for all the time you spent to help me!
Back to Top View SoaresS's Profile Search for other posts by SoaresS
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 331
Posted: 17 July 2008 at 5:56am | IP Logged Quote Vyacheslav

Hi SoaresS!

We has tried many solutions. But without result. Sorry.
Maybe the best solution for you is frames.

__________________
Kind regards!
Vyacheslav.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
SoaresS
Newbie
Newbie


Joined: 15 July 2008
Location: France
Online Status: Offline
Posts: 4
Posted: 17 July 2008 at 8:20am | IP Logged Quote SoaresS

Thanks again (and again ...) 

I know exactly what to suggest now.
I think that frames are the solution too.


Back to Top View SoaresS's Profile Search for other posts by SoaresS
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
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