Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: fixit on September 23, 2006, 09:53:39 AM
-
I'm looking for a rewrite rule that will remove metadot from the url, is this possible, as the attempts that i have done so far have not worked. the path needs to be absolute for metadot to load, so is it possible
http://www.mydomain.com/metadot/index.pl
change to
http://www.mydomain.com/index.pl
Thanks, Russell
-
Set the metadot ibay as the primary content ibay and it will work like charm!
-
it already is in the Primary ibay
-
it already is in the Primary ibay
Is it in a directory called metadot in the Primary iBay?
Can you move it up one level?
-
I tried moving it up one level, it does not work that easy, I wish it did though. I think I would have to rewrite the whole code of metadot to do that, but I need to find a much easier way,LOL.
I may need to look at something to do with a mod rewrite or maybe something with the template fragment
I can change the Alias to what ever name I want, but thats not what I'm after
Alias /whatever/ /home/e-smith/files/ibays/Primary/html/metadot/
Example of Template
#Metadot
Alias /images/ /home/e-smith/files/ibays/Primary/html/images/
Alias /js/ /home/e-smith/files/ibays/Primary/html/js/
Alias /metadot/ /home/e-smith/files/ibays/Primary/html/metadot/
Alias /public/ /home/e-smith/files/ibays/Primary/html/sitedata/public/
Alias /skins/ /home/e-smith/files/ibays/Primary/html/sitedata/skins/
Alias /htmlarea3/ /home/e-smith/files/ibays/Primary/html/js/htmlarea3/
Alias /private/ /home/e-smith/files/ibays/Primary/html/sitedata/private/
<Directory /home/e-smith/files/ibays/Primary/html/metadot>
Options +Indexes
Options +Includes
AllowOverride All
SetHandler cgi-script
PerlHandler speedy::Registry
PerlSendHeader On
Options +ExecCGI
AddType application/.html .pl .pm
DirectoryIndex index.pl
</Directory>
This html file is associated with it somehow
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="refresh" content="0;url="/metadot/index.pl" />
<title>Loading</title>
</head>
<body onload="document.location='/metadot/index.pl'">
<!-- the following block was used to allow Firefox to redirect, since
it has a bug with http-equiv. This is now being fixed with the javascript entry above.
-->
<!--
<div style="margin: 30px; padding: 1em; border: 1px solid #ccc; background-color: #eee;">
You are being transported to the Metadot portal server.
<a href="/metadot/index.pl">Click here if you have not been redirected.</a>
</div>
-->
</body>
</html>
Is it possible to change the Alias in the template to use these instead
AliasMatch
ScriptAlias
ScriptAliasMatch
I'm looking for some option that will still load the script, but not show the refernce in the url.
I have tried mod_rewrites in the httpd.conf which will load the index.pl but not metadot.
any ideas on what is a good option to try
Russell
-
# 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]
Was being discussed here. (http://www.metadot.com/index.pl?id=&isa=Message&op=show&mid=7797&from=0&discussion_id=2608)
-
Do you use metadot, if so, did you try that rewrite rule and did it work for you.
For some reason that rule is not working and I have been asking around everywhere on how to remove metadot from the url
Russell
-
I don't use it but everything on the 'net points to this being the way.
Did you alter httpd.conf esp the AllowOverrides bit?
<Directory /home/e-smith/files/ibays/Primary/html>
Options None
Options +Indexes
Options +Includes
AllowOverride None
order deny,allow
deny from all
allow from all
</Directory>
In the accounts db you can add the AllowOverride property.
-
This is what I have for Primary ibay taken from httpd.conf
<Directory /home/e-smith/files/ibays/Primary/html>
Options None
Options +Indexes
Options +Includes
AllowOverride All
order deny,allow
deny from all
allow from all
</Directory>
-
I found the problem, it had nothing to with mod rewrites or .htaccess files, what I did was change the Alias's and modified the index.html
Example of the template fragment
#Metadot Test Server
ServerName www.testserver.local
DocumentRoot "/home/e-smith/files/ibays/Primary/html/metadot/"
Alias /images/ /home/e-smith/files/ibays/Primary/html/images/
Alias /js/ /home/e-smith/files/ibays/Primary/html/js/
Alias /index.pl /home/e-smith/files/ibays/Primary/html/metadot/index.pl
Alias /public/ /home/e-smith/files/ibays/Primary/html/sitedata/public/
Alias /skins/ /home/e-smith/files/ibays/Primary/html/sitedata/skins/
Alias /htmlarea3/ /home/e-smith/files/ibays/Primary/html/js/htmlarea3/
Alias /private/ /home/e-smith/files/ibays/Primary/html/sitedata/private/
Alias /userchannel.pl /home/e-smith/files/ibays/Primary/html/metadot/userchannel.pl
<Directory "/home/e-smith/files/ibays/Primary/html/metadot">
Options +Indexes +Includes +FollowSymLinks -MultiViews
AllowOverride All
SetHandler cgi-script
PerlHandler speedy::Registry
PerlSendHeader On
Options +ExecCGI
AddType application/.html .pl .pm
DirectoryIndex index.pl
</Directory>
The index.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="refresh" content="0;url="/index.pl" />
<title>Loading</title>
</head>
<body onload="document.location='/index.pl'">
<!-- the following block was used to allow Firefox to redirect, since
it has a bug with http-equiv. This is now being fixed with the javascript entry above.
-->
<!--
<div style="margin: 30px; padding: 1em; border: 1px solid #ccc; background-color: #eee;">
You are being transported to the Metadot portal server.
<a href="/index.pl">Click here if you have not been redirected.</a>
</div>
-->
</body>
</html>
:lol: