Reputation: 375
I want to rewrite pagination URLs http://mydomain.com/category?start=15
to http://mydomain.com/category/start/15
, but I don't know how to achieve this with .htaccess.
PS: those URls ( http://mydomain.com/category?start=15
) are referenced in search engines so I need to add 301 redirect to my new URLs.
I want mention that I already enabled SEF mode in Jommla configuration
Upvotes: 1
Views: 1556
Reputation: 4004
First, if you want your URLs to look like /start/15
you have to rewrite them from the pretty format to the internal, not otherwise.
I currently have no access to an Apache, but your expression should look something simliar to this:
RewriteRule ^category/start/([0-9]+)$ http://mydomain.com/category?start=$1 [QSA,L]
Then, it would be neccesary to tell Joomla how to generate the pretty URLs, this happens without the htaccess file, for example in a SEO plugin.
Finally, to output 301 messages, you will want to add "Redirect
" commands to your .htaccess file. Redirect incoming ?start=15
URLs to the pretty format. Make sure that this does not happen after your Rewrite...
Upvotes: 1