Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x support forum
 Helicon Tech : ISAPI_Rewrite 2.x support forum
Subject Topic: relative linking redirect rule Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
deepakrajr
Newbie
Newbie


Joined: 07 August 2007
Online Status: Offline
Posts: 19
Posted: 18 August 2008 at 7:29am | IP Logged Quote deepakrajr

Hi,

i need a rule to help with my relative linking url's on my website.

basically i'm seeing access to my server like this:

http://www.example.com./
my server is allowing this to happen, the only problem i have is that with my relative linking between pages the . after the com is being placed in every url that links from that page
for an example
http://www.example.com./ will link to
http://www.example.com./directory/index.htm

i need to redirect http://www.example.com./ to this http://www.example.com/ across the whole server. so it doesn't matter which directory is accessed with the .com./ the rule should rewrite the URL without the dot after the com


i hope someone can help me on this.

Regards
Deepak.

Back to Top View deepakrajr's Profile Search for other posts by deepakrajr
 
Vyacheslav
Moderator Group
Moderator Group


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 673
Posted: 27 August 2008 at 6:05am | IP Logged Quote Vyacheslav

Hi Deepak.
Please try this:
Code:
RewriteCond Host: ^www\.example\.com\.$
RewriteRule ^(.*)$ http\://www.example.com$1 [I,L,RP]


__________________
Kind regards!
Vyacheslav Shinkarenko, HeliconTech.
Back to Top View Vyacheslav's Profile Search for other posts by Vyacheslav Visit Vyacheslav's Homepage
 
deepakrajr
Newbie
Newbie


Joined: 07 August 2007
Online Status: Offline
Posts: 19
Posted: 03 September 2008 at 3:14am | IP Logged Quote deepakrajr

Hey,

Many Thanks Vyacheslav works like a charm.

Regards
Deepak


Back to Top View deepakrajr's Profile Search for other posts by deepakrajr
 
deepakrajr
Newbie
Newbie


Joined: 07 August 2007
Online Status: Offline
Posts: 19
Posted: 19 September 2008 at 2:21am | IP Logged Quote deepakrajr

Hi Vyacheslav,

sorry to bring this one up again, the above rule works fine for the com./

but how can i make it so any character will rewrite the url except a /

as an example
http://www.example.com:/

http://www.example.com::::::::/

should all redirect

but obviously we'll need the exclusion on the / character.

Hope you can help me on this.


regards
Deepak
Back to Top View deepakrajr's Profile Search for other posts by deepakrajr
 
Lexey
Moderator Group
Moderator Group


Joined: 15 August 2002
Location: Russian Federation
Online Status: Offline
Posts: 7559
Posted: 19 September 2008 at 2:39pm | IP Logged Quote Lexey

RewriteCond Host: www\.example\.com.*
RewriteRule (.*) http\://www.example.com$1 [I,RP]
Back to Top View Lexey's Profile Search for other posts by Lexey
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum