WebSite X5Help Center

4 RéPONSES - 1 UTILES
Giancarlo B.
Giancarlo B.
User
Meilleur utilisateur du mois IT

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

Lire plus
Posté le 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.

Lire plus
Posté le de Eric C.
Nektarios K.
Nektarios K.
User
Auteur

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

Lire plus
Posté le de Nektarios K.
Nektarios K.
Nektarios K.
User
Auteur

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]

Lire plus
Posté le de Nektarios K.