D
D
Dmitry Ivanov2018-01-31 13:00:08
Yii
Dmitry Ivanov, 2018-01-31 13:00:08

Where to fix Urls in Yii?

I got a job as a SEO in a company. Site on yii. Never worked with him. There is no proger in the state. I need to fix some urls. In the admin panel of functions, two times and miscalculated. I can't find where I can go to fix this.
1. The site has categories in the admin panel and their CNC url from the admin panel changes, but this category is preceded by a path like /sale/ , /rent/ etc. That is, a link of something like this site.ru/rent/commerse/prodaetsja-baza-po-ul-holmistaja-postrojjki-1500-kvmuchastok-1-ga/
/commerse/ I can change from the admin panel. Anything further is the url of a specific page, I can also change it ... but I can’t change /realty/ because it’s not in the admin panel and where it lies - x.z. I tried to search stupidly in the search for files, but there are a lot of matches with this name (for example, filters on the site are called that, etc.)
Just in case, I'll make it clear. /commerse/ is a category. but there are two on the site. i.e. there is /sale/commerse/ along this path we have an advertisement for the SALE of real estate, and along the path /sale/commerse/ an advertisement for the rental of real estate ...
And the category itself is one prntscr.com/i82a7d
prntscr.com/i82akj
These are the so-called categories are formed by choice when publishing an ad.
prntscr.com/i82cvg
After this choice, /sale/ or /rent/ are assigned... I haven't seen such stupidity for a long time. Why it was impossible to make separate categories Real Estate Sale and Real Estate Rent and then just choose a category ... But what we have, we have
2. On the category page, each ad also has a curved path in the link for no reason.
www.prntscr.com/i82gnw
It is not clear what it is at all.
3. Instead of subcategories, some "tags"
All this is not subcategories ... subcategories cannot be created through the admin panel at all. These are some tags. i.e. when creating an advertisement, you need to select its type and the advertisement will go, as it were, to the desired "subcategory".
prntscr.com/i82hzh All
right with that. But again, all these "subcategories" have such a URL /realty/tag/kvartiry-v-novostrojkah-voronezh/... I need to remove both realty and /tag/ So that the page has a normal NC link to the right place .. .but in this case, I can't even change /kvartiry-v-novostrojkah-voronezh/... as there is no management under categories or these "tags" in the admin panel. I can’t add or edit these things through the admin panel.
PS Where to dig at all, at least the approximate location of the files in which I can eliminate these things or replace them ?!
Just in case, here is a site for clarity https://nikvrn.ru

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
OKyJIucT, 2018-01-31
@Hopkins777

Look for the urlManager section in config/main.php - most likely there. But there may be a couple more options, depending on the mood and experience of the developer who wrote it. In general, this is not taken out in the admin panel, it is corrected in the configs.
But the urls still depend on how they were written in the view files - by hardcode, or using the framework tools. It is difficult to answer unambiguously.

M
Maxim Fedorov, 2018-01-31
@Maksclub

In addition to the obvious advice - look at the urlManager in the configs, I note:
- make changes ONLY through the developer (or from his consultations), judging by the screenshots, there is quite a lot of functionality there, in addition to tags and categories, there are also types, they are at the beginning of the url (sale and rent)
you climb to change - it’s like you’ll break the routing.
Such construction of urls does not contradict CNC, and even more so SEO promotion, here you need to understand that you probably don’t know everything even in your part ... you also need to understand that not everything can be redrawn precisely due to business problems ... but there is confusion ... there is something to do
WELL, comrade, this is just cool for SEO - a ready-made selection for a low-frequency query ... Enter had such a loud case:
“phones for grandmothers”, “phones with big buttons”
from the developer’s point of view, it’s a good solution, you don’t need to do recursions and nesting because of 2 types
It’s just a framework, they do what the developer wants on it, if something isn’t displayed in the admin panel, it’s easy to display and refine ..
Why not CMS ? Well, there are many reasons, but believe me - it will be easier to finalize the current site than on the CMS, just believe me... it's not clear why the site is without a developer...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question