Forum Moderators: phranque
Presently, individual url's appear like so:
http://example.net/cms/?q=node/838
and comments to posts appear like so:
http://example.net/cms/?q=node/838#comment-5483
I'm wanting to rewrite the url's so they appear like this:
http://example.net/node/838
or if comments then
http://example.net/node/838#comment-5483
Before I start making changes would appreciate some confirmation or advice re - RewriteRules.
This is the rule I've got in mind
RewriteRule ^cms/\?q=node/([0-9]+.*)$ node/$1 [R=301]
[edited by: encyclo at 9:22 am (utc) on May 13, 2008]
[edit reason] examplified [/edit]
Once you have changed the links on all of your pages, you can use mod_rewrite to do two things:
1) Tell the server where to go in the filesystem in order to serve the content for those new URLs.
2) Externally redirect clients (browsers and search engine robots) to the a new URL if they ask for an old one.
See this thread [webmasterworld.com] for more information.
Jim
[edited by: jdMorgan at 2:03 pm (utc) on May 13, 2008]