Opened 10 years ago

Closed 7 years ago

#2250 closed Bug/Something is broken (fixed)

Updating Server Configuration (301 Redirects)

Reported by: the notebook Owned by: Jamie McClelland
Priority: Urgent Component: Tech
Keywords: drupal Cc:
Sensitive: no


Hello Mayfirst,

We are in the process of migrating a lot of our old content into our new Drupal-based site. I am using your Control Panel to add our redirects to the Server Configuration.

We have a lot of content and I have run out of space in the server configuration input box - it cuts off my input after a few characters and I still have a few more items to add in.

Is there an additional way to add these URL redirects?


Change History (8)

comment:1 Changed 10 years ago by Jamie McClelland

Wow - you've really filled that out. I've never actually tested the limits of that field, but sure enough it's stored in a mysql text field (with a limit of 65,000 bytes).

At the risk of getting a performance hit - you might consider using a .htaccess file instead. It would certainly make management easier. If you are worried about peformance, you could use just use .htaccess for the ones that won't make it into the form.

It does look like you are using a drupal database - which means the .htaccess file in use is the one supplied by Drupal. So you would need to delete the symlink to our central drupal .htaccess file, copy the central drupal .htaccess file (from /usr/local/share/drupal-6/.htaccess), and then edit it to add your remaining entries.

Sheesh - I realize this is not ideal... but I'm hard pressed for a better solution at the moment.

What do you think?


comment:2 Changed 10 years ago by the notebook

Hello Jamie,

Thank you for your response. Yes, I can make your proposed solution work for us. I understand completely that there are constraints on user input and it is unrealistic to ask you to change your internal db structure! :-)

I am comfortable with putting our redirects in a .htaccess file as yes, there are A LOT of them!

I am not a 100% sure how to set up a .htaccess file in your environment with the centralize Drupal setup which is why I was using the Control Panel.

As I understand it, I would do the following:

  • delete the .htaccess symlink from
  • copy the .htaccess file from /usr/local/share/drupal-6/.htaccess to

Is that correct?

How do I reconcile the info in the Control Panel with the .htaccess file?

Do I copy everything entered through the Control Panel so far and add it to the bottom of the .htaccess file?

Do I delete what is entered through the Control Panel?

Or do I only add what I can no longer fit in the Control Panel to the .htaccess file?

Thanks again for all your help.

comment:3 Changed 10 years ago by Jamie McClelland

Yes - you've got the process down - except your copy statement should put the .htaccess file in your web directory.

From you home directory, it would be:

cp /usr/local/share/drupal-6/.htaccess

I would recommend appending to the .htaccess file only your redirect statements (and only removing those statements from the web config part of the control panel).

Let us know how it goes.


comment:4 Changed 10 years ago by the notebook

Priority: MediumUrgent

Hi Jamie,

I followed your instructions above but the changes recommended broke the site and now we are having some serious problems.

Here is the what I did:

  • removed the redirects from the server config via the control panel, leaving everything intact
  • copied the .htaccess file from /usr/local/share/drupal-6/.htaccess locally and appended only my redirects to it.
  • placed that .htaccess file in

At first, I got a 403 Forbidden error but I checked the permissions on that file and after giving read and execute to everyone, I was able to get past that.

However, any URLS beyond the home page i.e. anything like were coming up with 404 errors.

I have put everything back exactly the way it was:

  • restored the server config through the control panel
  • removed my .htaccess file
  • added the link back to the /usr/local/share/drupal-6/.htaccess

Now however, we are having a Drupal problem with our comments - an error message is displayed on the pages and the comments are not showing. You can see an example here:

I hesitate to debug it too much since I have not changed anything else in the Drupal config and I have put everything related to .htaccess back the way it was.

Could you please help us resolve this issue as soon as possible?

Also, we do need to resolve the issue of using our own .htaccess file to resolve the redirects - how can we do that without causing problems? I posted the version of the .htaccess file I made for our purposes on if you would like to review it for reference.

Thank you.

comment:5 Changed 10 years ago by Jamie McClelland

Hi thenotebook,

I'm not seeing an error message on the page you posted:

Is that problem fixed? If so - how did you fix it?

I'm also not see a file called .htaccess_thenotebook.

Did you look in your error logs? They might have a clue about what is going.


comment:6 Changed 10 years ago by the notebook

Hi Jamie, sorry for the confusion - I posted an update but for some reason it did not get posted. Anyway, all is ok - our Drupal install needed to be updated to 6.13 - error messages were appearing because of that and causing us some confusion because I was messing with the redirects at the same time!

Anyway, all is ok - we upgraded and then I followed your instructions to set up the .htaccess file with our redirects and all is working fine now.

Thanks again and so sorry for any confusion.

comment:7 Changed 10 years ago by Jamie McClelland

Great - glad it's all working now.

Thanks for reporting back.


comment:8 Changed 7 years ago by Daniel Kahn Gillmor

Keywords: drupal added
Resolution: fixed
Status: newclosed

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.