University Web Developers

University Web Developers

Aliases and redirects are a daily request that fulfill the demand to forward traffic from a short, friendly web address to a long, unfriendly web address (e.g. forwards traffic to We manage aliases and redirects through a plain-text file with each line containing comments or a alias/redirect entry, and we're nearing the 3k lines mark.

I am looking for feedback on how other universities manage aliases/redirects to see if there is a better method especially considering the adoption of university branded URL shorteners (e.g. Please let me know how your university manages aliases and redirects.

Previous discussions on redirects:

Apache Redirects

Comment on 301 redirects

Changing URLS after website redesign

Views: 1108

Reply to This

Replies to This Discussion

I'd also be interested in knowing about this. Our alias file has become quite long over the years.

We use a simple mysql table that holds the aliases and redirect url. On our 404 page we check the url that and see if its in the database and then redirect over and log each redirect so we can do simple analytics. There is also a minimal admin interface to add/modify/delete redirects.

I recently rewrote the application which handled our redirections. Our old version was a CodeIgniter app which relied on a MySQL database. It functioned similarly to the one that Tryon described. The problem was that our MySQL was hosted on a finicky machine. Whenever the machine or MySQL went down, so did all of our 3000+ redirects. In the process of finding a better solution, I did a decent amount of research and testing.

My first inclination was to use .htaccess to redirect requests. This works well if you only have several hundred redirects. However, once you go over about 500, it starts slowing down. I imported all 3200 redirects into an .htaccess file and did some testing. It took .htaccess 5 milliseconds to process a request. Our old CodeIgniter/MySQL solution took about 11 milliseconds, so initially I was excited.

However, after some additional research, I decided against using htaccess. Apache accesses the htaccess file for every request made. Although our old application took twice as long to process a redirect, it only did so when handling a 404. The htaccess method would process every time any page or file was requested. This would have tied up significantly more resources on our server, even if there was no noticeable difference to the user (6 milliseconds).

The method which I landed on was a multidimensional php array, which stored each redirect, its target, and whether it was a permanent redirect in a sub-array. A php script would parse through the array trying to match the requested URL. In affect, it replaced the MySQL db from the old application with an array. Matching an array key instead of running a MySQL query was significantly faster. The new version takes approximately .7 milliseconds. I set it up so that the array is built out from our CMS, so there's no need to edit the actual php file. It's very easy to manage.

So overall, here are my findings:

  • .htaccess: 5 milliseconds (per request!)
  • PHP/MySQL: 11 milliseconds (per 404)
  • PHP array: .7 milliseconds (per 404)

The one downside of my script is that it doesn't keep any analytics data. This could easily be remedied, I just haven't gotten to it yet. The upside is that I'm no longer dependent on MySQL.


Did you benchmark the results in the case where you take a similar .htaccess file; however, it is included on start instead of on request? We use this method where we have to restart the apache service to load changes to the redirects file.

What was your process for capturing the results? I can do a Network Capture to watch the responses but I want to try to follow your same testing methodology.

I'm guessing on these, numbers, but I believe an empty htaccess file took about .5 milliseconds for the request (compared to 5 milliseconds for 3000 redirects). The way ours is set up, we don't have to restart apache.

My benchmarking was fairly rudimentary. I believe I repeated a curl_exec() request 1000 times, measuring the response time for each request. I averaged these values. I'm sure there are better ways to do this. I'm still learning php.

I'm going to use Apache Benchmark to do some tests today. I'll report the results when I'm finished.

The attached image shows the results from performance testing. The tests involved a system operating on Linux 2.6.18, Apache 2.2.3, 8GB RAM to serve as a the "host" and another system Mac OS X 10.7.3, 8GB RAM to serve as the "tester."

The tests were completed using ApacheBench. Each test involved submitting 10 requests, one at a time to the designated URI. After each test the results were recorded, the environment updated for the next test case, and a restart was performed.

Let me know if you have any questions on how testing was done.

Nicely done. I'm confused about what the graph means by "PHP" vs "Include." Could you explain?

"PHP" tests followed this example:

"Include" tests involved adding "Include /path/to/configuration/file.conf" to the Apache httpd.conf file. This file is essentially identical to the .htaccess file except how Apache interacts with the file. Included files are loaded once and "remembered forever."

Interesting. This seems to contradict my findings. With the include method, would you need to restart apache every time you made an update to the conf file? We create new redirects every few days, so having to restart apache each time would be a pain.

We had the same concern about restarting apache being a pain; however, it really hasn't been that bad of an experience. The problem that we're facing is the management of all the redirects.

Removing duplicates, expiring unused redirects, tracking redirects, etc.



Latest Activity

Erin Jorgensen posted a discussion

HighEdWeb 2020 Accessibility Summit

The HighEdWeb 2020 Accessibility Summit is a one-day, online conference about digital accessibility in higher education happening June 25, 2020, from 10 a.m. to 5 p.m. CDT.Join in to learn best practices, share stories and connect with your higher ed peers on topics including social media accessibility, web development, user experience and more. Sessions are designed to boost knowledge at every level, from accessibility beginners to technical experts. Conference registration is $25, with…See More
Erin Jorgensen is now a member of University Web Developers
Christine Boehler posted a discussion

HighEdWeb 2020 Annual Conference - ONLINE

October 19-20, 2020     Join us ONLINE for HighEdWeb 2020, the conference created by and for higher education professionals across all departments and divisions. Together we explore and find solutions for the unique issues facing digital teams at colleges and universities. In 2020, the Conference will be held completely online, offering multiple tracks of streamed presentations, live…See More
May 3
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"Throughout April, we're hosting webcasts exploring how colleges and universities across North America are responding to the COVID-19 pandemic. Register for the series today!"
Apr 13
Christelle Lachapelle is now a member of University Web Developers
Apr 6
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"Download our latest white paper to learn how the demographics of today’s higher ed learners are shifting, and how schools can adapt to meet the needs of these new learners."
Mar 31
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"Join our next webcast with Amrit Ahluwalia from The EvoLLLution to learn about the new "modern learner" in higher education."
Mar 30
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"As we ride out the latest developments and impact of the coronavirus, there's no better time than now to learn the three Bs of crisis planning."
Mar 16
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"Is your college or university prepared to meet the challenges that come with disasters and emergencies like the coronavirus? Learn how your CMS can help."
Mar 12
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"Can’t afford the time and money to launch a comprehensive guided pathways model? Register for our FREE webcast to learn tricks for simulating a digital guided pathways experience."
Feb 21
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"With college enrollment decreasing for the 8th year in a row, boosting your college or university marketing efforts is more important than ever. Here's how to get started."
Feb 20
Christine Boehler posted a discussion

HighEdWeb 2020 Annual Conference

October 18-21, 2020 in Little Rock, Arkansas, USA     Join us for HighEdWeb 2020, the conference created by and for higher education professionals across all departments and divisions. Together we explore and find solutions for the unique issues facing digital teams at colleges and universities. With 100+ diverse sessions, an outstanding keynote presentation, intensive workshops, and engaging networking events,…See More
Feb 19
Christine Boehler posted a discussion

HighEdWeb 2020 Call for Proposals is Open!

The 2020 Annual Conference of the Higher Education Web Professionals Association (HighEdWeb) will travel to Little Rock, Arkansas, this October 18-21 — and the call for proposals is now open! As a digital professional in higher education, we know you have great ideas and experiences to share. From developers, marketers and programmers to managers, designers, writers and all team members in-between, HighEdWeb provides valuable professional development for all who want to explore the unique…See More
Feb 14
Christine Boehler shared Sara Clark's discussion on Facebook
Feb 14
Christine Boehler is now a member of University Web Developers
Feb 14
Brian Bell joined Kevin Daum's group
Feb 14
Brian Bell joined Mark Greenfield's group
Feb 14
Kenneth George is now a member of University Web Developers
Feb 13
John Sterni is now a member of University Web Developers
Feb 6
Sara Arnold commented on Lynn Zawie's group OmniUpdate
"The early-bird discount for OUTC20 ends today! Don't wait... register NOW and save $100!"
Jan 24

UWEBD has been in existence for more than 10 years and is the very best email discussion list on the Internet, in any industry, on any topic


© 2020   Created by Mark Greenfield.   Powered by

Badges  |  Report an Issue  |  Terms of Service