Forum for discussing general topics related to Couch.
6 posts Page 1 of 1
Hello!

I have read a tutorial from this site, and read the "Custom Routes" article but I still can not solve my problem.

For example, a blog that was created in the tutorial, when we look at the blog in list-view and pretty-url is activated the address is:

http://www.mytestsite.com/blog

What I need, is to change the word "blog" in an address bar to another(for example, blog in Ukrainian: "блог"), but not renaming the file blog.php.
As a result the address will look like:

http://www.mytestsite.com/блог

but not renaming the file blog.php. Thank you!
Hi :)

Wouldn't it be much easier to use a template named блог.php for the blog instead of blog.php? No need for custom routes or anything.

I must add, that if you already have created pages from a template named blog.php then just renaming blog.php to блог.php won't cut it (Couch will think you have deleted blog.php and created a new template блог.php with no pages - so you'll lose existing pages).

The right way to rename blog.php to блог.php is discussed in the following thread - https://www.couchcms.com/forum/viewtopic.php?f=4&t=9608

Does that help?
KK, thanks for your answer, but it did not help.

The ideia is to allow users to access website over the two following addresses:

http://www.mytestsite.com/blog
http://www.mytestsite.com/блог

so, I added in my .htaccess

Code: Select all
RewriteRule ^блог(/.*|)$ /blog.php [L,NC]


but it does not work with pretty URL :cry:
as far as I understand couch sends old URL.

So I'm out of options now...

How can I simulate the /блог/
Why it did not help, i wonder? I mean, the real way of doing this is more complex than anything else. http://www.couchcms.com/docs/custom-routes/

I would create 2 templates instead, blog.php would be main one and блог.php would be a derivative. With <cms:pages masterpage='blog.php' > you can display variables from the main one.

You see, if you want to do this with CMS, it is either custom routes or duplicating file. I'm not aware of any other way.
trendoman, thank you for your answer, but if I need to simulate more than 1 path, without any content changes? So, I have to create files with different names, it's OK, but imagine yourself in the place of the user, which will see a bunch of copies of variations of the "Blog" word in admin panel, but where you can not change anything, because it's just a simulation.

Once again, I do not need to change the content into another language, only additional URL to access same page.
PonyTale wrote: user, which will see a bunch of copies of variations of the "Blog"

user is going to be super-admin? if not, then hidden='1' in template parameters can help here.

I was playing with Cyrillic names some time ago. It is against the standards and after a year or so i ditched all of them finally. I am not saying anything against your decisions, but probably you might reconsider url.

Anyway, any complex url structure can be created with custom routes. Seems, you want to go this way. Let us, please, know where do you end up with your research. Custom Routes is a standard procedure for a case like yours. htaccess won't help here, afaik.
6 posts Page 1 of 1