Forum Moderators: phranque
The URLs are now like
www.example.com/path/filenumber/lang,en/
And I want (really need to keep SERPs) them to be:
www.example.com/path/filenumber/
I've tried several combinations but I think that maybe is due the "," character:
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ lang\,en/$1 [R=301,L]
Any idea?
Thank you very much
[edited by: jdMorgan at 4:05 am (utc) on April 2, 2007]
[edit reason] Example.com [/edit]
So the links determine what will appear in search engine listings, while mod_rewrite can then be used in the URL-to-filename translation phase of server processing to map the URL back to the actual filepath of the desired content.
As mod_rewrite makes clear, URLs and filepaths are not the same thing, and in fact, need not have any fixed relationship with each other. A URL is a locator for use on the Web, while a filepath is a locater for use inside the server filesystem. mod_rewrite sits between the Web and the server filesystem, and can take part in the URL-to-filename translation.
RFC 2396 [faqs.org] defines the characters which are valid within the various URI components, and a comma is a reserved character. Therefore, I recommend that you change your URL convention to use an unreserved character, such as "-" or "_".
Jim