Keyword

htaccess to get rid of "show" prefix page

  • Matt
  • Matt's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 7 months ago #109948 by Matt
With the new feature introduced in K2 2.6.5 all tag listings can have a selected prefix as described in the article. So a URL to a prefix can look like this
domain.com/show/tag/bla

Users can access the show page with this:
domain.com/show
What I want now is to redirect the URL above to the homepage. Meaning

Redirect this
domain.com/show

to this:
domain.com

I made a 301 redirect rule in my htaccess file and it works, but with a side effect. Now all tag pages look like this:
domain.com//tag/bla

You see there is the "show" missing, but it shouldn't. Can anyone tell me how to redirect /show to the homepage without removing it from tag URLs?

This is the rule I used:
RewriteRule ^show$ $1 [R=301,L]

Thanks.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum