WebSite X5Help Center

4 RISPOSTE - 1 UTILE
Giancarlo B.
Giancarlo B.
User
Utente del mese IT

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

Leggi di più
Postato il da 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.

Leggi di più
Postato il da Eric C.
Nektarios K.
Nektarios K.
User
Autore

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

Leggi di più
Postato il da Nektarios K.
Nektarios K.
Nektarios K.
User
Autore

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]

Leggi di più
Postato il da Nektarios K.