Question

We send out a newsletter that has URLs in it. Rather than having foreign URLs directly, they all come to our website and then redirect to the outside world.

Right now the redirects are all done with HTML files. My goal is to have them all done with redirects in the .htaccess file. So I want to have the person who is entering all of this data enter it all through the movable type GUI.

My questions:

  1. Is there is plug-in for movable type that already does this?
  2. If not, is there a good template for creating a movable type that allows one to records in the MySQL database?

Thanks.

Was it helpful?

Solution

This could be done in the standard Entry interface in MT. Just dedicate a blog for these redirects. You could make the EntryTitle the redirect and have the EntryBody be the full URL (or use Custom Fields). Then just create an .htaccess template that loops through all the entries.

<mt:Entries lastn="0">
Redirect /<mt:EntryTitle dirify="-"> <mt:EntryBody>
</mt:Entries>

OTHER TIPS

The way I would do this is to create a custom field for the outside URL.

Then I would populate the .htaccess file with something like:

Redirect / 

In the above coding, I'm looping through the latest 999 entries and I'm checking if the custom field with the tag 'EntryDataMyCustomField' is filled out.

If it is filled out, then I redirect / to the URL from that custom template.

This is like redirecting say:

/234 to whatever URL you may think of, like say: http://en.wikipedia.org/wiki/Main_Page

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top