.htaccess - how to rewrite a custom url in joomla using htaccess -


I am preparing a news website using joomla 2.5

I will retry this URL Want to write:

http://domain.com/categoryname/?format=feed&type=rss

http: /domain.com/rss/categoryname

Note : I'm using mode_rewrite .htaccess for joomla.

Please help me quickly thanks to each body in this site.

Apache's mod_rewrite to use the Regex pattern to create a different URL A URL for

The pattern is applied to the path and allows you to do this in your example such as / rss /(.+)] / code> whatever / rss / and after that there will be at least one letter bracket is called a capturing group and you can refer to that in the second parameter in the RewriteRule command.

The second part / $ 1 /? Format = feed & type = RSS , refers to the first captured group in the pattern and puts it in the new URL.

Finally, you want to indicate that this is a L] flag.

This gives you a rule of:

  RewriteEngine On RewriteRule /rss/(.+) / $ 1 /? Format = feed & amp; Type = RSS [L]   

If you intend to pass query strings to this new URL, then you need to add an additional flag QSA , as a result [L] instead of [L, QSA] .

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -