Biplob Hossain

Enabling Pretty URLs in Concrete CMS

May 16, 2024 | by biplob.ice

white-concrete-building-under-blue-sky-during-daytime-scaled-e1715910674405

Enabling Pretty URL in Concrete CMS

If you want to enable pretty URLs in Concrete CMS, you can do so through the dashboard and then make some server-side configurations. Pretty URLs are also known as clean URLs, search-engine-friendly URLs, or semantic URLs. They do not contain query parameters and instead contain only the path of the resource.

Configuring Concrete CMS

To enable pretty URLs from the dashboard in Concrete CMS, follow these steps:

  1. Login to your Concrete CMS dashboard.
  2. Go to the Dashboard and click on the System & Settings tab.
  3. Under the Basics section, select SEO & Statistics.
  4. Check the box for “Pretty URLs” to enable it.
  5. Save the changes.

Configuring Apache Server

If you are using an Apache server, after enabling pretty URLs from the dashboard, you need to add the following piece of code to the .htaccess file in the webroot:


   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME}/index.html !-f
   RewriteCond %{REQUEST_FILENAME}/index.php !-f
   RewriteRule . index.php [L]

Configuring Nginx Server

If you are using Nginx instead of Apache, the configuration for enabling pretty URLs will be different. You will need to add the following configuration to your Nginx server block:

location / {try_files $uri $uri/ /index.php?$query_string;}

After making these changes, remember to restart your web server for the new configurations to take effect. Once done, your Concrete CMS website should now have pretty URLs enabled, providing a cleaner and more user-friendly experience for your visitors.

RELATED POSTS

View all

view all