Questiomark in blog url 
Автор: Nektarios K.
Просмотрено 315,
Подписчики 1,
Размещенный 0
On my website, I created a blog. The URL of the article shows like this https://www.pamsmaritime.com/blog/?pre-purchase-inspection
The suggestion is to remove the question mark.
How can I do it?
Regards,
Nek
Размещено

If your site is hosted on an Apache server, you can insert a rule in the .htaccess file to make the URLs cleaner.
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.
Автор
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
Автор
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]