WebSite X5Help Center

4 RESPOSTAS - 1 ÚTIL
Giancarlo B.
Giancarlo B.
User
Usuário do mês IT

If your site is hosted on an Apache server, you can insert a rule in the .htaccess file to make the URLs cleaner.

Ler mais
Publicado em de Giancarlo B.
Incomedia
Eric C.
Incomedia

Hello Nektarios,
it is not possible to change this aspect for dynamic pages (such as blog articles and product pages) through the settings of WebSite X5, I recommend checking out what Giancarlo mentioned or similar external options.
I remain available.

Ler mais
Publicado em de Eric C.
Nektarios K.
Nektarios K.
User
Autor

Hi there 

With this in .htaccess the ? gone

RewriteEngine On

# 1. Redirect /blog/?variable to /blog/variable (Clean URL)

RewriteCond %{THE_REQUEST} \s/blog/\?\s*([^\s&]+) [NC]

RewriteRule ^ /blog/%1? [R=301,L]

# 2. Internally map /blog/variable back to /blog/?variable so the server can read it

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^blog/([^/]+)/?$ /blog/?$1 [L,QSA]

Rgds

Nek

Ler mais
Publicado em de Nektarios K.
Nektarios K.
Nektarios K.
User
Autor

As the second page of the blog post is inactive, the updated htaccess instructions  below apply and solves the problem 

RewriteEngine On
RewriteBase /

# 1. PREVENT LOOPS
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]

# 2. EXTERNAL REDIRECT
RewriteCond %{THE_REQUEST} \s/blog/(?:index\.php)?\?([^&\s]+)\s [NC]
RewriteRule ^ /blog/%1? [R=301,L]

# 3. INTERNAL MAPPING
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/([^/]+)$ /blog/index.php?$1 [L,QSA]

Ler mais
Publicado em de Nektarios K.