Default controller/action, htaccess and dinamic pages in DB

Hello and good day.

I have a question about Yii.

I am creating a small CMS and I need to load pages from the database.

My problem is this;the site loads dynamic content from

This connect to the page 1234 and gets the content.

How I can delete the controller/action and convert the query to the name of the topic? like this

Thanks for your time.


any ideas?

Yah you can…

Add in .htaccess

	# if a directory or a file exists, use it directly

	RewriteCond %{REQUEST_FILENAME} !-f

	RewriteCond %{REQUEST_FILENAME} !-d

	# otherwise forward it to index.php

	RewriteRule . index.php

Change in config=>main.php









Also you can change the rules based on your requirement like this
















Changing rules has worked.

Thanks for help!.