O
O
oe24y2014-07-21 12:38:33
CMS
oe24y, 2014-07-21 12:38:33

How to solve the problem with Joomla: I create a material, I assign an alias, when I switch to this alias in the browser, it gives an error?

The material is not categorized.
Gives a 404 error that the page does not exist.
Alias ​​Such - vse-o-nas
I pass in the browser to the page mysite.com/vse-o-nas - and gives an error.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Pushkarsky, 2014-07-21
@RainMEN

When you create a page at the bottom there is a field called Alias ​​in it and write in English the name of your beautiful link, but there are 2 buts!
1. The CNC must be enabled in the site settings.
2. The material must be added to some menu as an item, otherwise you will receive a 404 error. It is not necessary to display the menu on the site, the main thing is that it be.

N
nikitasius, 2014-07-21
@nikitasius

Probably someone will google this question, so the solution of friendly addresses for nginx lies in just a few locations for nginx + php-fpm .
1) defines paths for static

location ~ \.(jpg|jpeg|gif|ico|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|doc|docx|xls)$ {
  root /path/to/site;
}

2) close access for .htaccess
location ~ ^/(\.htaccess)$ {
  return 404;
}

3) directly rewrite itself for Joomla
location @friendlyurls {
  rewrite ^/(.*)$  /index.php/$1 last;
}

then when requesting "/about-us" nginx will rewrite it to "/index.php/about-us".
4) next for the site root
location / {
  try_files $uri $uri/ @friendlyurls;		
прочие параметры для php-fpm
}

5) for php files
location ~* \w+\.php$ {			
  try_files $uri $uri/ /index.php?$args;						
прочие параметры для php-fpm
}

In total, both friendly links and direct links to php files work for us.
If there is not php-fpm there, but apache behind nginx , then the 3rd location is not needed, and rewrite can be beaten in the proxy_pass settings in location / .
If you have pure apache and the links don't work, then check your joomla distribution and download the correct .htaccess.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question