Forum Moderators: phranque
AliasMatch ^/(?!art\/) (.*) /virtual/newtusa/showpage.cgi
I'm trying to host a site based of of the showpage.cgi templating engint on an online, but since I don't have access to the httpd.conf I need to figure out another way to route all url requests to the script using mod_rewrite (or anything that will accomplish the same thing). Any ideas? Thanx
Welcome to WebmasterWorld [webmasterworld.com]!
Lacking further details, here's a more-or-less straight translation, including setup:
Options +FollowSymLinks
RewriteBase /
RewriteEngine on
RewriteRule !^art/ /virtual/newtusa/showpage.cgi [L]
Note that the leading slash is omitted in RewritRule patterns in the .htaccess context.
Jim
RewriteRule!^art/ /virtual/newtusa/showpage.cgi [L]
Any reference to an actual system folder fails producing error 500. I can however rewrite to another url.
RewriteRule!^art/ http://www.example.com [L]
Is there a reason for this? Some server setting that denies me from referring directly to a file? Or is it a permisions issue?
Just to try to give you a little more info, the cgi script relies on the url for information. I'm currently using it to run http://www.example.com (no need to point out the flaws of the initial design (: ). Data is passed to the script through the url, which gives the information needed to draw a dynamic page, as well as appear static so that search engines can index the site. I need to find a way to preserve this functionality using the .htaccess file instead of an AliasMatch in the httpd.conf. Thanx Again
[edited by: jdMorgan at 9:00 pm (utc) on Jan. 8, 2004]
[edit reason] Removed specifics [/edit]
From msg#2 above: "you may or may not need the Options and RewriteBase directives"
In addition, you may need to set the [PT] flag, so that mod_rewrite output will be in URL form, rather than local filepath form.
If you are getting 500 errors, what does your error log say? - The info in the error log will often show you exactly how to fix the problem
Please review our Terms of Service [webmasterworld.com] - we don't post specific URLs or do site reviews here at WebmasterWorld. Thanks. :)
Jim