Hi
I have a question regarding redirecting the html in modx into an url
I created a folder (named folder1) and saved it on the webserver and created an html (named myfile.html) and saved it on the folder1.
Now if I go to www.mysite.com/myfile, the myfile.html will open.
What I would like to do is to redirect this myfile.html to a certain url that belongs on the site. How should I do that?
Btw, here is the code I wrote in the myfile.html file:
<html>
CONSTRUCTION – this page will provide the online documentation
</html>
and I would like that www.mysite.com/myfile
will open this content from my site
content1
Please help thanks
-
☆ A M B ☆
- 894 Posts
You can use the MODX extra
Redirector, although that's not what it was built for, you could also do it with
javascript.
Hope that helps.
Depending on what's in the mysterious 'myfile', you might also be able to use a simple redirect in the .htaccess file. Something like this:
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^myfile content1? [R=301,NE,L]