![]() |
| How to re-write a url? |
|
Nsahlas
|
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
|
Does any of the HMS staff have any feedback? Thank you.
|
||||||||||||
|
|
|||||||||||||
|
pmeserve
HostMySite Tech
|
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
|
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. |
||||||||||||
|
|
|||||||||||||
|
jarena
HostMySite Supervisor
|
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? |
|
||
|


