I just read about this technology and it seems like it can solve almost all my problems as a webmaster....
i have a few questions...
1. I want to change this link....
http://www.mysite.com/answer.asp?kwds=graphics
to
http://www.mysite.com/graphics.html
How do i do this?
2. How does this work? Do i modify a file on my server?
3. I have 2 sites hosted separately, server A i have ONLY FTP access to. So can i just write a script and upload it? or do i have have to change multiple files.
Server B i can ONLY UPLOAD files, minimal FTP access, will just uploading a single script work ?
I'm confused here... You don't want a redirect, those html files don't exists? You just want the URL to change?
0
mrperfect75000Author Commented:
SOrry i didnt explain that, those html files dont exist- i want to do a URL rewrite. Same content, I just want to rewrite the url to be static instead of dynamic.
Please point me to that on the isapirewrite site.
It IS possible to change a dynamic link to a static one or a static one to a dynamic one, but the browser will get a redirect and go to the second link. So it needs to exist.
Let me answer your questions in a different order than you asked:
2. How does this work? Do i modify a file on my server?
- This works by installing a Global ISAPI filter on the server and configuring it properly. You need to change IIS configuration and modify the configuration file for the ISAPIReWrite filter as well.
3. I have 2 sites hosted separately, server A i have ONLY FTP access to. So can i just write a script and upload it? or do i have have to change multiple files. Server B i can ONLY UPLOAD files, minimal FTP access, will just uploading a single script work ?
- You will need access to the IIS Management Console - FTP will not allow you to use or configure ISAPIReWrite. Additionally you will need administrative access to the machine in order to make the changes necessary.
1. I want to change this link....
http://www.mysite.com/answer.asp?kwds=graphics
to
http://www.mysite.com/graphics.html
How do i do this?
- ISAPIReWrite would be a viable method of doing this - it would be a fairly simple regular expression to write. You could also use URLRewrite from the IIS 6.0 Resource Kit Tools in a similar manner.
However, from the description you gave you don't have enough access to the server to install or configure either of these solutions.
You will need to speak with your hoster about implementing either of these solutions.
Dave, the page http://www.mysite.com/graphics.html doesn't exist. So I don't think ISAPIRewrite or URLRewrite can do this.
From what I see, mrperfect75000 wants the Browser URL to change to http://www.mysite.com/graphics.html but the executed server-side script still be http://www.mysite.com/answer.asp?kwds=graphics
Actually either will be able to do that. What they do is catch the request at the ISAPI filter level and modify the URL that is actually presented to the W3SVC service which then acts on the modified URL and sends a response back to the client.
The address in the client's browser is unaffected and the content is generated/pulled from whatever URL the filter changes it to.
Right... That's what I'm saying. Sorry if I'm not clear enough.
He wants to change the link from (for example's sake):
http://www.mysite.com/answer.asp?kwds=graphics
to:
http://www.mysite.com/graphics.html
BUT http://www.mysite.com/graphics.html doesn't exist, so IIs won't be able to serve it.
Look at my ASP redirect script, that didn't work for him since the redirect-to page doesn't exist.
Make sense?
0
mrperfect75000Author Commented:
Yes I was trying to have the browser change and still have the same content. I want the browser to change because i dont want the user or search engines to see my dynamic links.
But i want the content to stay the same.
If i can do that with an ASP redirect script that would be the best so i wont have to talk to my host
thanks
mrperfect75000, I'm sorry, but you can't change the browser URL. You don't control that.
So your goal is to avoid search engines? Or do you want search engines to show the link as a static one?
If you DON'T want your site indexed, simply add a robots.txt in your root with:
User-agent: *
Disallow: /
Or if you only want that script out:
User-agent: *
Disallow: /answer.asp
0
mrperfect75000Author Commented:
My goal is to not let people change kwds, just because they see asnwer.asp?kwds=graphics, they can just change it to asnwer.asp?kwds=techno and get the right thing. And i also understand search engines dont index dynamic links.
Either ISAPIReWrite or URLRewrite can be used to create a table where a URL such as http://www.mysite.com/graphics.html would be intercepted by the filter and internally changed to http://www.mysite.com/answer.asp?kwds=graphics for the server to act upon.
A simple RegEx something along the lines of match http://www.mysite.com/*.html and translate it to http://www.mysite.com/answer.asp?kwds=%1 would work for ISAPIReWrite. The rules for URLRewrite are slightly different but could be managed as well.
This would let the user see http://www.mysite.com/graphics.html but the server would act as if it had received http://www.mysite.com/answer.asp?kwds=graphics instead.
This being said, there is no way to set this up or configure it via FTP. You would have to work with your hosting provider to set this up and if you are not hosting on a dedicated server they will likely not want to install a Global ISAPI filter that can affect all the site on the server.
ISAPIRewrite/URLRewrite and that link you sent all do the same thing, they "redirect" the request in a way.
If your users can't get direclty to a link for security reasons and such, then you need to change your application to avoid that.
As an example, let's say that you pull the kwds from a database, stick a random number in each row and then make the link:
http://www.mysite.com/answer.asp?kwds=graphics&id=48632
When you pull graphics from the DB, you check that the id also match what the table has for graphics, if not, you return an "Invalid Query" page.
As far as search engines not indexing dynamic links... If they can get to it (linked from another page), there is good chance it will be indexed.
0
Question has a verified solution.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
<% Response.Redirect("graphic