Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
menu system
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
21 Feb 2008 at 23:30 UTC
Updated:
6 Feb 2017 at 06:43 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
boombatower commentedI suppose I should attach the patch.
I assume this could be adapted for 6.x and HEAD.
Comment #2
chx commentedSomething is not right, get q does not contain the query string.
Comment #3
chx commentedComment #4
cwgordon7 commentedComment #5
dugh commentedsubscribe, I had a patch to do this in drupal 5, but forgot it. I need a patch for drupal 6 now.
Comment #6
brian_c commentedI have this working in D7 via hook_url_inbound_alter(): http://drupal.org/node/118072#comment-4706374
Comment #7
killah89 commentedGot to work for D6 please.
Thanks :D
Comment #8
geek-merlinThis totally makes sense. Patch looks like a good starting point.
D8 will take a totally different approach so tagging this D7.
Comment #9
amit0212 commentedI think you can do this with the Redirect module (it won't provide an alias in its truest form but it will forward you on to the right page).
In .htaccess you could a custom RewriteRule before Drupal's main index.php rule:
RewriteRule ^myownstuff$ stuff?owner=myself [L,QSA,R=301] # QSA and R=301 are optional here
If neither of these work there is a quick and dirty way in a custom module:
function MYMODULE_init() {
if ($_GET['q'] == 'myownstuff') {
drupal_goto('stuff', array('query' => array('owner' => 'myself')));
}
}
If you've got more than one path to forward/a pattern etc. you'll have to extend this a bit but the logic will work.
I think the .htaccess is probably the best way as it doesn't actually forward on to the URL but masks it internally which I guess is what you're after.
You might also want to look at hook_url_inbound_alter() which I believe you can use to get this kind of functionality...I've not used it before so I can't comment further though.