Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: fixit on March 15, 2006, 03:14:23 AM
-
I would like an example of a Mod_Rewrite for something like this
www.mydomain.com.au/metadot/index.pl
how would I remove the /metadot from the url that is displayed in the address bar to display something like
www.mydomain.com.au/index.pl
Thanks, Russell
-
I would like an example of a Mod_Rewrite for something like this
www.mydomain.com.au/metadot/index.pl
how would I remove the /metadot from the url that is displayed in the address bar to display something like
www.mydomain.com.au/index.pl
Thanks, Russell
See /etc/httpd/conf/httpd.conf for quite a few examples, and here for the gory details:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
In your case, you can probably use a URL of the form:
www.mydomain.com/foobar/
and use Alias or ScriptAlias to point to the real path.
-
OK, I got my example of Rewrite rule to remove metadot from the url. Now how do i go about creating it. Do I create a custom template or create a htaccess file
Example;
# Rewrite rule to remove /metadot/
RewriteCond %{HTTP_HOST} www.metadot.com
RewriteRule ^/index.pl(.*) /metadot/index.pl$1 [PT]
RewriteCond %{HTTP_HOST} www.metadot.com
RewriteRule ^/userchannel.pl(.*) /metadot/userchannel.pl$1 [PT]
Thanks, Russell
-
I think it would be better to make a template fragment
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf
but could we not just use
Alias / /home/e-smith/files/ibays/primary/html/metatdot
in this file
I have never made a custom template, so I am trying to figure out this at the same time... feel free to add or change anything