Reputation: 1
I have wordpress installed. I want to customize permalink as following:
Category: http://my-domain/{category-name}/
Post: http://my-domain/{category-name}/{postname}/
Post with params: http://my-domain/{category-name}/{postname}/{param1}/
Post with params: http://my-domain/{category-name}/{postname}/{param1}/{param2}/
Can I do only use .htaccess? Thanks!
P.S: Sorry for my bad English.
Upvotes: 0
Views: 49
Reputation: 741
In Wordpress you can do this through backend. Go to Settings-->Permalinks-->Custom Structure
and insert:
%category%/%postname%
If you wish to use other subfolders you need to create .htaccess file (if you are using Apache) in your root folder and use url rewrite like this:
RedirectMatch 301 /old-directory/(.*) /new-directory/
Be sure mod_rewrite Apache module is enabled.
Upvotes: 0
Reputation: 28425
In the admin dashboard, customize the permanent links to
http://my-domain/%category%/%postname%/
Upvotes: 1