Forum Moderators: phranque

Message Too Old, No Replies

What is the correct mod rewrite syntax for this:

Rewrite including subdirectory path?

         

Markus Klaffke

6:19 pm on Feb 5, 2008 (gmt 0)

10+ Year Member



Sorry for the idiotic subject title.

I am using this mod-rewrite code to access my cms` s gateway script, which is written in python. It works so far.

RedirectMatch permanent ^/$ /blog/
RedirectMatch permanent ^/blog$ /blog/

RewriteEngine on
RewriteBase /
RewriteRule ^blog(.*) /cms/gateway.cgi$1 [L,NE]
RewriteRule ^$ /cms/gateway.cgi/ [L]

With this voodoo everything is served with the URL /blog/, which is also the cache.

How can i set up a second redirect and rule for the folder /blog/registry/ and the gateway file register.cgi?

I have tried various combinations but i don' t know how to handle a directory plus sub-directory with mod-rewrite. How can this be done?

jdMorgan

12:29 am on Feb 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Please post your best attempt as a basis for discussion. At least it will clarify what you're trying to do and where you might be going wrong...

Thanks,
Jim