Hi,
After hours of reading manuals and countless trials I'm close to loosing the plot.
The problem: After entering an URL like <www.mydomain.com.au/4711> into the a browser a page has to be served with the number after the "/" used as ID to get the appropriate information out of 4D. The destination page is uses get form variable ("ID") to obtain the right information.
Question: How can I tell Apache to take the number after the slash and re-write it to the destination page so "get form variable" can grab it as the ID-variable?
Configurations Web Server: G4 MacOS X 10.2.8, Apache 1.2.27
4D Server G4 MacOS X 10.2.8, 4D 2003.1, Active4D 3.0.b14
Here are some samples I already tried:
RewriteRule (.*) /[0-9]+$1 http://192.168.3.4:8000/4DCGI/myFolder/ mypage.html$1 [P] RewriteRule (.*) [0-9]+$1 http://192.168.3.4:8000/4DCGI/myFolder/ mypage.html$1 [P] RewriteRule (.*) /([0-9]+) http://192.168.3.4:8000/4DCGI/myFolder/ mypage.html/$1 [P] RewriteRule (.*) ([0-9]+) http://192.168.3.4:8000/4DCGI/myFolder/ mypage.html/$1 [P]
Any help is highly appreciated.
A few comments:
I've only worked with WebSTAR's Rewrite implementation and it differs from apache. I would guess though that your third rule is probably closest to what you need.
Do you have Active4D configured to process .html pages? All of your examples above attempt to be redirecting to a page with a .html file extension. If A4D isn't configured to process these types of pages then it won't process your code.
The other problem appears to be with the syntax of the URL you are redirecting too. Incorporating my comment above you may want to try to redirect to http://192.168.3.4:8000/4DCGI/myFolder/mypage.a4d$ID=$1 [P]. I've changed the file extension, used a $ instead of a slash, and provided an ID query parameter.
Assuming, the rule does forward the request to the above page, and Active4D processes it, you should be able to get the value of ID from get form variable("ID") or via _FORM{"ID"}.
hth,
Brad
Cheers J�rg
_______________________________________________ Active4d-dev mailing list [EMAIL PROTECTED] http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
