| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
#16
|
|||
|
|||
|
Rust Indy, trying to make this work
Rust Indy, thank you for your contribution. I have followed your code below, however, the big question is. How do I produce the 404 from my products page?
How is the 404 being triggered if the path is OK and the application is working. In order for me to trigger the error, I had to trick the page to redirect to a non existing directory, but I have to take that off because it will end up looping around (it was just to test). Also, the Server.Transfer("/" & MyUrl.url(0) & ".asp?id=" & MyUrl.url(1)) piece of code is coming back with an error. When I print the value of ("/" & MyUrl.url(0) & ".asp?id=" & MyUrl.url(1)) on the browser, it seems like MyUrl.url(1) is empty and MyURL.url(0) holds the old dirty querystring. Isn't this the variable which needs to carry the desired URL output? I am getting all confused, I have tried several of these sample codes (modified them and all) and they don't work. I am really hesitant to moving to a dedicated server hosting to install ISAPI Rewrite, it is 3 times what I am paying now for my hosting package. The website I am trying to make URL Frienly is 9searches.org This is a free directory, and it works fine, I just want to make it more SEO friendly. Anyone feel free to post, by the way. Can anyone help me? |
|
#17
|
|||
|
|||
|
remove query string from url
Hi
i want to remove querystring from url.how it possible.plz mail me details with example.how it used. mithlesh |
|
#18
|
|||
|
|||
|
But what about the Search Engines
Isn’t the reason why most webmaster want to strip the querystring from a dynamic URL for search engine optimization purposes? If so, how will messing around with error codes help.
It sounds like the solution is a whole lot worse then just leaving the querystrings as is. I have found that Google indexes dynamic pages very well. It’s only Yahoo and MSN who don’t do as good a job. What I need is a solution which can be used on a shared hosting plan where I have no access to IIS server. If anyone has a solution for me please let me know. ![]() |
|
#19
|
|||
|
|||
|
See if the webserver contains or if you can purchase a dedicated URL Rewrite component
e.g. For IIS you could use ISAPIRewrite For *nix Apache you could use Mod_Rewrite
__________________
CyberTechHelp |
|
#20
|
|||
|
|||
|
Shared Hosting Plan
Quote:
I have looked around but I've had no luck finding a Shared Hosting package which offers ISAPIRewrite. If any one knows of one please share it! Thanks |
|
#21
|
|||
|
|||
|
Here's my workaround since Server.Transfer doesn't support querystring using Rust Indy's class:
Code:
<%
Set MyUrl = New URL
Dim intNumOfDir: intNumOfDir = MyUrl.count
Select Case intNumOfDir
Case 5:
strNewURL = "/" & MyUrl.url(0) & "/" & MyUrl.url(1) & "/displaycategory.asp"
End Select
Set objXML=Server.CreateObject("Msxml2.ServerXMLHTTP")
objXML.Open "POST", "www.mywebsite.com" & strNewURL, False
objXML.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXML.Send "ID=" & MyUrl.url(3)
strHTML = objXML.ResponseText
Set objXML = Nothing
Response.Status = "200 OK"
Response.Write strHTML
Response.End
%>
Still a work in progress and your landing page cannot use querystring anymore since it's posting to it, so if it's an existing application, changes will be needed. |
|
#22
|
|||
|
|||
|
Hi,
Above example is very useful whenever we change in custom error page.But i want without change the custom error page how to re write the url in classic asp. Please send reply to me. Thanks. Kumar.A |
|
#23
|
|||
|
|||
|
help me
rewrite.asp line 12 error sTemp = Right(sTemp, len(sTemp) - 4) ??? |
![]() |
| Viewing: ASP Free Forums > Programming > Code Bank > URL Rewriting with ASP/IIS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|