Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Redirect a url only at a certain point



11:56 pm on Sep 6, 2012 (gmt 0)

5+ Year Member

Hi guys,

I didn't really know what the title of this topic should be.. but here's what I'm trying to achieve:

I want to redirect domain.com/forums/ (note: ending slash) to domain.com/forums.

However I only want to redirect it when the first url there is accessed, because all the forums url's look like this: domain.com/forums/topic/324-title/ So it is important only to remove the slash when the /forums url is accessed.

I am also trying to do this using the .htaccess file.

Thanks in advance,


12:07 am on Sep 7, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Since /forums/ is a folder, the canonical URL is the one with a slash.

Don't fight the HTTP specifications.


1:25 am on Sep 7, 2012 (gmt 0)

5+ Year Member

Its actually not a folder. The "forums" is a controller. Alternatively I could figure out how to get the controller to recognize both forums and forums/, right now the latter returns a 404, but I thought it would easier with htaccess.

Featured Threads

Hot Threads This Week

Hot Threads This Month