Reply to topic
How to re-write a url?
Nsahlas


Joined: 08 Apr 2004
Posts: 43
Location: Chicago
Reply with quote
A friend of mine was telling me that you can create a small script on your site that will take a url like the following:

www.somewhere.com/article.cfm?id=1

and actually return:

www.somwhere.com/article_o1.cfm (or something similar)

Could someone point me in the right direction on how to achieve this? I am on a cold fusion server and I would love to hava static url for my dynamic content.

Thanks.
Nsahlas


Joined: 08 Apr 2004
Posts: 43
Location: Chicago
Reply with quote
Does any of the HMS staff have any feedback? Thank you.
pmeserve
HostMySite Tech

Joined: 19 Mar 2004
Posts: 178
Reply with quote
Nsahlas,

Sorry about the delay in getting back to you. If you're on a Linux server, mod_rewrite would be your best option. If not, you may be able to put some code in the Application.cfm file in your directory which would parse the URL and then load the appropriate content based on that(without sending GET variables)

Let us know if you need more help on this - I'd try to be more specific but I don't know CF
Connie


Joined: 26 Mar 2005
Posts: 176
Location: The Internet
Reply with quote
http://www.houseoffusion.com/ and scroll down to Search Engine Safe (SES) URLs for doing this in ColdFusion

and I kind of ripped it from a previous post here. Embarassed
jarena
HostMySite Supervisor

Joined: 14 Dec 2004
Posts: 66
Location: Newark, DE
Reply with quote
Here is a redirect script in ASP:

<%EnableSessionState=False

host = Request.ServerVariables("HTTP_HOST")

if host = "sitename.com" or host = "www.sitename.com" then
response.redirect("http://sitename.com/subsite/index.htm")

elseif host = "sitename2.com" or host = "www.sitename2.com" then
response.redirect("http://sitename2.com/subsite/index.htm")

else
response.redirect("http://sitename.com/error.htm")

end if
%>
How to re-write a url?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic