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: SEO-friendly Urls Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
mr_tom
Newbie
Newbie


Joined: 03 July 2008
Online Status: Offline
Posts: 4
Posted: 03 July 2008 at 10:14pm | IP Logged Quote mr_tom

I need help with a rule be for converting http://wildcardDomainandport/about_us to http://samedomainandport/content.cfm/about_us

This rule should only fire if not /index.cfm or /content.cfm.

Any help greatly appreciated. Thanks.

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


Joined: 02 July 2008
Location: Ukraine
Online Status: Offline
Posts: 331
Posted: 08 July 2008 at 7:50am | IP Logged Quote Vyacheslav

Hi mr_tom!

Please try this solution:

Code:
RewriteCond %{REQUEST_URI} ^(?:.*)/?(?:index|content)\.cfm$ [NC]
RewriteRule .? - [L]
RewriteRule ^([^/]+)$ http://samedomainandport/content.cfm/$1 [NC,R=301]



Edited by Anton - 08 July 2008 at 7:56am


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


Joined: 03 July 2008
Online Status: Offline
Posts: 4
Posted: 16 July 2008 at 10:58pm | IP Logged Quote mr_tom

These are not working, unfortunately.

To clarify, I need to accept http://host/about_us and redirect to http://host/content.cfm/about_us

Host should be a wildcard.

Any ideas?

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


Joined: 03 July 2008
Online Status: Offline
Posts: 4
Posted: 17 July 2008 at 12:49am | IP Logged Quote mr_tom

This produces correct output, but IIS 6 still gives a 404. Any ideas?

RewriteRule http(s?)://(.*)\.(com|net)/(?:(?!(?:index\.cfm|content\.cfm)))(.*) http$1://$2.$3/content.cfm/$4 [L]

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

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