Hi
I'm having a great deal of fun discovering the ins and outs of rewrite rule and I thought I only had one two issues left...
I want to have a dynamic site using rewrite on look static. So I’ll have page.cgi and other scripts dynamically creating the pages and rewrite on will create URLs that look static.
I came across the issue that if I used d=1 to indicate I wanted dynamic pages that I couldn’t get the rewrite rules to work properly. For example when I generate www.sitename.com/mag/articles/article_name_L1.html with no d=1 then I get this exact link and it works but if the page linking to it has d=1 activated then I will get www.sitename.com/cgi-bin/page.cgi?g=mag/articles/article_nameL1.html;d=1 instead.
Now however I’m realizing that this may just become unrealistic in that I have both category.html and new.html and maybe others that are generating files that are either dynamic when I use d=1 (with the above issues) or static and don’t point to the right place since I only have dynamically generated pages….
For example for the category “others” I will have in category.html without d=1 :
www.sitename.com/others/index.html
whereas I’d like to have :
www.sitename.com/mag/others/index.html
so that my rewrite rule kicks in:
RewriteRule ^/mag/(.*)$ /cgi-bin/page.cgi?g=$1
but I'm guessing this will lead me down a road where I need to modify the core code in order to be able to have the whole site dynamically created but to look static.
I was thinking I could also to a redirect of :
/others/* to /mag/others so that then the rewrite on would kick in but it seems a bit of an overkill server-side.
I’m wondering whether a) I’ve got the wrong rewrite rules and that there is a way to have d=1 activated or b) I’m looking at this the wrong way or c) the dynamic cloaked solution is not going to work ?
Any wise advice would be greatly appreciated
Thanks, John
Significant Media
I'm having a great deal of fun discovering the ins and outs of rewrite rule and I thought I only had one two issues left...
I want to have a dynamic site using rewrite on look static. So I’ll have page.cgi and other scripts dynamically creating the pages and rewrite on will create URLs that look static.
I came across the issue that if I used d=1 to indicate I wanted dynamic pages that I couldn’t get the rewrite rules to work properly. For example when I generate www.sitename.com/mag/articles/article_name_L1.html with no d=1 then I get this exact link and it works but if the page linking to it has d=1 activated then I will get www.sitename.com/cgi-bin/page.cgi?g=mag/articles/article_nameL1.html;d=1 instead.
Now however I’m realizing that this may just become unrealistic in that I have both category.html and new.html and maybe others that are generating files that are either dynamic when I use d=1 (with the above issues) or static and don’t point to the right place since I only have dynamically generated pages….
For example for the category “others” I will have in category.html without d=1 :
www.sitename.com/others/index.html
whereas I’d like to have :
www.sitename.com/mag/others/index.html
so that my rewrite rule kicks in:
RewriteRule ^/mag/(.*)$ /cgi-bin/page.cgi?g=$1
but I'm guessing this will lead me down a road where I need to modify the core code in order to be able to have the whole site dynamically created but to look static.
I was thinking I could also to a redirect of :
/others/* to /mag/others so that then the rewrite on would kick in but it seems a bit of an overkill server-side.
I’m wondering whether a) I’ve got the wrong rewrite rules and that there is a way to have d=1 activated or b) I’m looking at this the wrong way or c) the dynamic cloaked solution is not going to work ?
Any wise advice would be greatly appreciated
Thanks, John
Significant Media