Forum Moderators: phranque
(Problem: when i am clicking on http://www.example.com/cgi-bin/CGISample.exe/Ziedi?hiacintes link - it opens, but if i click on http://www.example.com/Ziedi/hiacintes - it doesnt work)
[edited by: jdMorgan at 3:21 pm (utc) on Sep. 24, 2009]
[edit reason] Please use example.com. See Terms of Service and Charter. [/edit]
You can also use the WebmasterWorld site search to look for 'rewriterule static URL to dynamic script' and other such keyword phrases to turn up hundreds of previous threads on this subject, and check our Forum Library for selected threads as well (links are at the top of this page).
Jim
Your rule appears to be backwards. With the above note in mind, and assuming the code goes into .htaccess, this will likely be closer to what you need:
RewriteRule ^Ziedi/hiacintes$ /cgi-bin/CGISample.exe/Ziedi?hiacintes [L]
If this is the only RewriteRule you've got, then you'll need to set up and enable mod_rewrite before the rule:
Options +FollowSymLinks
RewriteEngine on
RewriteEngine On
RewriteBase /
RewriteRule ^Ziedi/hiacintes$ /cgi-bin/CGISample.exe/Ziedi?hiacintes [L]
Thanks for this answer!
But it still doesnt open www.ttii.com/Ziedi/hiacintes
Also, i would like to better understand one thing: why i cannot write like this:
RewriteRule ^(.*)/(.*)$ /cgli-bin/CGISample.exe/(.*)(.*)1$ [L] ?
Get the single-page "hiacintes" rule working first, before trying to make it work with "Ziedi/<any-plant>" URLs.
[added] ... and do be sure to completely-flush (delete) your browser cache before testing any new server-side code. Otherwise, your browser will show you previously-cached 'pages' and server responses, and will not send a request to your server. Therefore, your new code can have no effect. [/added]
Jim