How to find default home page file name of a website? For example: wordpress.com I'm not admin of wordpress.com but i want to know what's default home page filename of it? default home page file name in my owned website is index.php but i'm not sure what's it, in other websites! is any code or api or program to find default home page file name of other websites? tnx a lot
Depending on how the site is set up, it can be anything. Normally, it's either index.html or index.php, since those both "automatically" gets run if you enter an URL. However, again, depending on how the site is set up, this might be shown to the user, or not - hence, it's not really possible to figure this out 100%. BTW, on wordpress.com, it's index.php
i know what's the default page in wordpress.com that was just an example... my problem is winsock.dll in VB6 in the url argument, i must input something like this: http://www.site.com/index.php if i use this http://www.site.com the winsock function can't get html data of the website! when we open a browser like firefox and input the site.com in it... how can the firefox find the default page in a website !!!!!? i'm sure browser programs use winsock dll ...
Perhaps the webpage site.com/index.php has not been redirected properly. It will be better to put 301-redirect to that URL.
its index.php index.html home.php home.html in that order also, remember that now url's get rewritten by apache, so you may see some other thing in the address bar. .htaccess is the first file to be processed by apache, before anything else.
admins can easily access to the .htaccess file of a website anyone know how can non admins (view) the .htaccess file of a website?
Firefox doesn't find the "default" page of anything - it uses what the server provides. Check to see what is being delivered to Firefox - use the webdev plugin, for instance. You cannot access a site's .htaccess. You're going about this from the wrong entry-point. The site you're trying to reach has some sort of issue or problem, which prevents whatever function you're trying to use via VB6 to not provide the information you need. What that is, I've no idea, since you're not explaining what you're trying to do. However, it's NOT needed to provide the actual file for winsock - the site-name should be enough.
do you know winsock? Set RemoteFile = New DataConnection With RemoteFile . . .FetchURLString "http://yahoo.com" << it can't get html of yahoo.com but if i input something like http://yahoo.com/sample.asp it can work very well . . End With Code (markup):
I dunno - I don't know winsock.dll, but as far as I can understand from the documentation I've read today, you're either using the wrong functions, libraries or similar. It's perfectly possible to get the content via the main url only - no need for the actual filename (unless you want to provide certain subpages or similar, of course). First - which language are you using, and how do you start the connection?
I'm using Visual Basic 6 (VB6) It's a visual basic class written by The KPD-Team, March 13th, 2002 It seems the KPD-Team die )) I attached the vb project to the post I have to search for a new vb component to download HTML of websites from the web
Finally I have found the answer... this code working great anyway thank you for your time Private Sub Form_Load() Text1.Text = GetHTMLCode("http://yahoo.com") End Sub Function GetHTMLCode(Optional strURL As String) As String Dim objHttp As Object, strText As String Set objHttp = CreateObject("MSXML2.ServerXMLHTTP") objHttp.Open "GET", strURL, False objHttp.setRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0" 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) objHttp.Send ("") strText = objHttp.responseText Set objHttp = Nothing GetHTMLCode = strText End Function Code (markup): Source by http://stackoverflow.com/users/1587402/searas