Working on a website where dozens of links have been hardcoded. This is causing a problem because someone logged onto marty.com may inadvertently click a link for www.marty.com, or vice versa, and gets an access denied message.
Now my first question is, is this normal Drupal behavior, or is there a place for me to specify something presumably with how cookies are set to make this not even be a problem? Or is it not even Drupal, just the way cookies work? I'm assuming that cookies are the root cause of the access denied issue.
Secondly though I wanna change all these links in the menu_links.link_path which say something like:
http://www.marty.org/?q=node/7 or http://org/node/?q=node/13
to simply say /?q=node/7 and /?q=node/13.
Two questions on that:
1. is this the only change required for this issue? 2. am I right in thinking this can only be done programmatically ie. there's no way to put together a one line mysql update query that'll work?
Thanks in advance, Marty
Are the links in the content? Menus? or Anywhere? *
Ryan LeTulle,* Web Developer
personal: bayousoft.com http://www.bayousoft.com twitter: @bayousoft http://twitter.com/bayousoft
http://twitter.com/bayousoft*"Be the change you want to see in the world." * Mahatma Gandhi
On Sat, Feb 12, 2011 at 2:29 PM, Marty Landman mlandman@face2interface.comwrote:
Working on a website where dozens of links have been hardcoded. This is causing a problem because someone logged onto marty.com may inadvertently click a link for www.marty.com, or vice versa, and gets an access denied message.
Now my first question is, is this normal Drupal behavior, or is there a place for me to specify something presumably with how cookies are set to make this not even be a problem? Or is it not even Drupal, just the way cookies work? I'm assuming that cookies are the root cause of the access denied issue.
Secondly though I wanna change all these links in the menu_links.link_path which say something like:
http://www.marty.org/?q=node/7 or http://org/node/?q=node/13
to simply say /?q=node/7 and /?q=node/13.
Two questions on that:
- is this the only change required for this issue?
- am I right in thinking this can only be done programmatically ie.
there's no way to put together a one line mysql update query that'll work?
Thanks in advance, Marty
-- http://www.face2interface.com/ https://addons.mozilla.org/af/firefox/addon/181910/
-- [ Drupal support list | http://lists.drupal.org/ ]
On Sat, 12 Feb 2011, Marty Landman wrote:
Working on a website where dozens of links have been hardcoded. This is causing a problem because someone logged onto marty.com may inadvertently click a link for www.marty.com, or vice versa, and gets an access denied message.
Now my first question is, is this normal Drupal behavior, or is there a place for me to specify something presumably with how cookies are set to make this not even be a problem? Or is it not even Drupal, just the way cookies work? I'm assuming that cookies are the root cause of the access denied issue.
There is something about this in settings.php (sites/default/settings.php). Search for "base url", or check around line 108 or so.
One way I have handled this issue, is to create an apache virtual host for "www.site.com", which just contains a rewriterule to "site.com", and passes any elements passed in the URL, such that "www.site.com/node/45" redirects to "site.com/node/45". That has worked well, but it results in more redirects than you probably want, so better to solve the overall problem.
Regards,
Luke
Hope it's ok to reply / follow up on my own posting. I ended up finding these hardcoded links on 70 menu entries and a couple of hundred nodes and changed them using mysql substring and replace functions from the shell.
Fortunately we have a test site before going live with these changes.
Marty
At 03:29 PM 2/12/2011, Marty Landman wrote:
Working on a website where dozens of links have been hardcoded. This is causing a problem because someone logged onto marty.com may inadvertently click a link for www.marty.com, or vice versa, and gets an access denied message.
Now my first question is, is this normal Drupal behavior, or is there a place for me to specify something presumably with how cookies are set to make this not even be a problem? Or is it not even Drupal, just the way cookies work? I'm assuming that cookies are the root cause of the access denied issue.
Secondly though I wanna change all these links in the menu_links.link_path which say something like:
http://www.marty.org/?q=node/7 or http://org/node/?q=node/13
to simply say /?q=node/7 and /?q=node/13.
Two questions on that:
- is this the only change required for this issue?
- am I right in thinking this can only be done programmatically ie.
there's no way to put together a one line mysql update query that'll work?
Thanks in advance, Marty
-- http://www.face2interface.com/ https://addons.mozilla.org/af/firefox/addon/181910/
-- [ Drupal support list | http://lists.drupal.org/ ]