This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Hello guys,
I would like to make multiple urls link to a single page.
example:
- patern: /organization
- patern: /team
both link to the file: organization.htm
I want to do this so i can translate pages and the url for better SEO.
I thought about editing the rainrouter but won't my changes be overwritten in an october update? Does anybody know of a way to do this?
Thanks in advance :)
Last updated
I thought about a regeluar expression, but october prevents me from using parentheses in the url.
Or do you mean that I should declare the url somewhere else?
Maybe you can use .htaccess
RewriteEngine On
RewriteRule ^organization.htm/(organization | team) http://domain.com/organization.htm [R=301]
For SEO, don't forget to add the canonical link tag to the page so search engines don't index duplicate content.
Content is going to be translated in each language with the translate plugin. So search engines won't be indexing duplicate content.
Our servers are running a NGINX stack, so creating the rewrite rules everytime a page is added won't be very convenient.
I feel the regex route in the url could be an option, and I'm going to experiment with that today!
As in Docs, regex is probably possible only with parameters.
This worked for me:
/:param|^\btest1\b|\btest2\b$
This will match /test1 and /test2 and open same October page.
1-10 of 10