Linux, Apache, PHP, MySQL Administrators Forums

Go Back   Linux, Apache, PHP, MySQL Administrators Forums > LAMP Forums > Apache

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-12-2009, 02:46 AM
Junior Member
 
Join Date: Jan 2009
Location: HongKong
Posts: 8
Question Force a Trailing Slash with mod_rewrite

Hello, we have a URL structure in this format http://www.domains.com/command/ . Via mod_rewrite this translates to http://www.domains.com/index.php/command/ .

The problem, we require the trailing slash to be always present for SEO purposes. However not all inbound links knows this either their links were old or just plain put incorrect i.e. http://www.domains.com/command . How do we force that trailing slash?

TIA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-12-2009, 02:52 AM
Administrator
 
Join Date: Jan 2009
Posts: 42
Default

Quote:
Originally Posted by jack1981 View Post
Hello, we have a URL structure in this format http://www.domains.com/command/ . Via mod_rewrite this translates to http://www.domains.com/index.php/command/ .

The problem, we require the trailing slash to be always present for SEO purposes. However not all inbound links knows this either their links were old or just plain put incorrect i.e. http://www.domains.com/command . How do we force that trailing slash?

TIA
Hi Jack,

zoticai+c has posted a similar solution on his blog here Cloak PHP Files as Directories and Force Trailing Slash via mod_rewrite

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-12-2009, 03:55 AM
zoticai+c's Avatar
Ambiguos Variable
 
Join Date: Jan 2009
Posts: 3,421
Default

Ahh, the solution is there already, hope that helps
__________________
···dotmanila···
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-12-2009, 03:56 AM
Junior Member
 
Join Date: Jan 2009
Location: HongKong
Posts: 8
Default

Sweet, just the solution I was looking for, thanks guys!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Tags
force trailing slash, mod_rewrite, seo


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:52 AM.


Community hosted with DotManila Consulting
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2