Having the ability to rename node/add/.. would be great to attempt bots looking for commonly enabled content types such as node/add/page, node/add/poll etc...

Edit: I suppose while we are at it, we could rename comment/reply/.. as well. (when the comment form is not on the same page as the node.

Thoughts?

Comments

pixelsweatshop’s picture

Issue summary: View changes

added comment/reply/ to request.

owntheweb’s picture

I was thinking the same thing as well. Looking at one of my sites' log messages, there are frequent anonymous requests to aliases such as node/add. Here's my first attempt at a patch contribution (whoohoo!).

DON'T USE THIS PATCH THOUGH....

It's missing something. I altered anything node/* to be consistent with anything user/* and admin/* in the module code. It works great on the admin side, but it causes a 404 error when viewing ALL nodes (yikes). I'll play around with this more likely tonight or tomorrow. In the meantime I look forward to any additional ideas on how to stop the all-node 404 thing or any concerns about this addition not being appropriate for this module.

This patch applies to the latest dev version.

owntheweb’s picture

Issue summary: View changes
StatusFileSize
new442 bytes
new3.64 KB
raphael apard’s picture

Thx for this patch.
I don't think it's safe to rename node path, so this patch will not be commited but people who need this feature may use this patch.

I can the case you just want to rename "node/add" and "node/add/*" it's probably safer to work on this path only whitout altering "node/*" path.

owntheweb’s picture

Fair enough. I'll submit a new patch today for node/add, node/add/* only. I totally understand the dangers after the trials and errors yesterday with node*.

If you feel it would be module-worthy, what are your thoughts about an additional patch for node/*/edit ? I've seen some of these types of requests from anonymous users in my logs before, and I feel it would be useful for personal and shared use.

raphael apard’s picture

Yes, i think node/*/edit can be renamed too, some bugs can appear but the most dangerous part is just node/* paths.

owntheweb’s picture

Cool. Let me see what I can do. If I can't break it with one of my personal sites, I'll post the patch here.

Thanks for the feedback and opportunity to become more familiar with patches.

raphael apard’s picture

Status: Active » Needs work
W.M.’s picture

It would be great if one will be able to rename node/x/edit path to something like {content-type}/{nid}/edit..

As for node/add/{content-type-name}: this can be renamed easily with a custom path alias:

node/add/{name}

to

{name}/add

pixelsweatshop’s picture

It would be great if one will be able to rename node/x/edit path to something like {content-type}/{nid}/edit..

This can be done with the extended path alias or subpath auto modules

As for node/add/{content-type-name}: this can be renamed easily with a custom path alias:

node/add/{name}

to

{name}/add

The problem with this s the old alias node/add/* will still redirect to the new alias. Bots will still be able to access it easily.

raphael apard’s picture

Thanks for this informations. Bot problem can be fixed with module like honeypot.
Advantage to use hook indbound et outbound url alter is to disable original url. Can be easy for the node/add path but i think till dangerous to do it on the node/[nid]. nicoz solution should be safer (keeping old path). If the purpose is clean url and not hidding url from bots, this is the right solution.

raphael apard’s picture

Status: Needs work » Closed (works as designed)
delacosta456’s picture

hi
for a consistent node/add renaming , that will never (as i have used in lot of project) fail access or still shown node/add to user when redirection

this sandbox module looks to be able to do what we want https://www.drupal.org/sandbox/gomesh/2453015

hope it help