WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

IT Discussion Forum Having IT issues? Got IT questions? Who doesn't? If you can't get your Apache to work with your MySQL or your php is choking on your ODBC... Let's see if we can help you come up with some ideas.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-28-2007, 04:57 PM
WebProWorld Pro
 

Join Date: Sep 2004
Location: www.shopbam.co.uk
Posts: 178
flanok RepRank 1
Default mor rewrite slash to non slash

Hi,

My site is a PHP dadabase driven site where all files should end without the /

i.e. mydomain.co.uk/insurance/cheap

However mydomain.co.uk/insurance/cheap/ also works and so duplicate content could be an issue. I would like the trailing slash to be diverted to the non trailing slash, or if it is better, the other way round.


I understand what the code will do, but I am not a coder and just get confused when it is all explained to me.

My solution has been to read the posts and copy and paste as many mod rewite code into my .htaccess file until I find one that works and have done this for non www to www and index to / issues which work ok.

But even looking at past posts I cant find a version that works.

So i am posting my .htaccess (minus real url) to see if the existing version is affecting any more additions or if someone can give me another version of the rewrite that may work. can you help?

here is my current .htacess. What can I add to send / to non /

RewriteEngine on

RewriteCond %{HTTP_HOST} ^(mysite\.co(\.uk¦m)¦www\.mysite\.com) [NC]
RewriteRule ^(.*)$ http://www.mysite.co.uk/$1 [L,R=301]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index.php$ http://www.mysite.co.uk/$1 [R=301,L]

# Is it not a file
RewriteCond %{REQUEST_FILENAME}!-f
# Is it not a directory
RewriteCond %{REQUEST_FILENAME}!-d
RewriteRule ^(.+)$ manager.php?url=$1 [L]

What can i add to this?

Thanks

Mark
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > IT Discussion Forum
Tags: , , ,



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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
using mod rewrite - does it help? etrader.ie Search Engine Optimization Forum 1 04-18-2007 06:05 PM
Need help with mod-rewrite ewhitaker Search Engine Optimization Forum 9 08-11-2006 03:25 AM
Double Trailing slash mark getting indexed wmrobwl Google Discussion Forum 1 04-19-2006 07:50 PM
MOD rewrite freehits Search Engine Optimization Forum 2 02-08-2005 07:16 PM
Nortel slash staff to raise profit globalhostinggroup Breakroom (General: Any Topic) 0 08-19-2004 01:41 PM


Search Engine Optimization by vBSEO 3.2.0