Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-31-2002, 01:17 AM   #1
Socks
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto
Posts: 8,475
PHP - Best way to make an HTML version of PHP pages?

So we have this dilemma. We want the search engines to see our individual review pages, and we don't think the spiders are all reaching them. I don't really know the best way to make sure this is happening, I'd like to customize each review page with keywords, titles, etc..

The only way I can think of without getting a dedicated server to do that empty directory trick, is to make a simple link list in an basic HTML page for the spiders.. Then links to a static copy of the reviews in HTML format.. If the user clicked anything they'd see the PHP, and most of the times our reviews remain static, unless a user posts a comment or a rating.. Sooo, we could do it once manually, but we'd like to do it regularly to keep the HTML pages updated with a more current version from our PHP driven pages..

Is that too fuckin ass backwards to even attempt? is there some kind of program that would parse the HTML including SQL queries and save it in a static HTML document? ;)

Ass. Backwards.

Socks
Socks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 02:09 AM   #2
DjSap
Confirmed User
 
Join Date: Jul 2002
Posts: 3,869
well im not a pro when it comes to SE's, but can't you use htacess to make the .html files parsed as php, then you will be able to make the the files look like html while they are actually php....
DjSap is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 02:13 AM   #3
TFCash
Confirmed User
 
Industry Role:
Join Date: Apr 2001
Posts: 1,738
Just put this in your .htaccess file in the root folder of your domain.


AddType application/x-httpd-php html
AddType application/x-httpd-php htm

That way it will parse all your .htm & html with php and you don't have to have .php any longer


Tim
TFCash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 03:05 AM   #4
ServerGenius
Confirmed User
 
Join Date: Feb 2002
Location: Amsterdam
Posts: 9,377
The problem is not the .php extension but many spiders don't
like the variables behind it. review.php?var=blah&var2=blahblah

You wrap the php in a script that will create virtual directories
so the example above looks like: /review/blah/blahblah this
solves the search engine issues.....I'll see if I have that code
lying around somewhere...

DynaMite
__________________
| http://www.sinnerscash.com/ | ICQ: 370820 | Skype: SinnersCash | AdultWhosWho |
ServerGenius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 05:37 AM   #5
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
Use modrewrite to rewrite the URL's
or modify the scripts to use $PATH_INFO like dmoz does.
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 06:15 AM   #6
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Using the dir structure url will create a 404 so in the head of the script you gota place header("HTTP/1.1 200 OK");

Then take each of the paths and explode them by / for PATH_INFO to work.

The make each / into an array and give it a var name.

$var_array = explode("/",$PATH_INFO);
$shit=$var_array[1];

Just echo the $shit and boom it works.

TheDoc
http://www.largecash.com
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 04:45 PM   #7
Socks
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto
Posts: 8,475
Quote:
Originally posted by TheDoc
Using the dir structure url will create a 404 so in the head of the script you gota place header("HTTP/1.1 200 OK");
TheDoc
http://www.largecash.com
What do you mean by that? My programmer understands the second part of this (the path info stuff), but isn't sure what this means or what it's for?

Thanks for all your help with this,

Socks

Last edited by Socks; 07-31-2002 at 04:46 PM..
Socks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 06:09 PM   #8
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
The above takes

http://www.domain.com/script.php?sex=yes&hot=no

and changes it to

http://www.domain.com/script/yes/no

TheDoc
http://www.largecash.com
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 06:11 PM   #9
Brujah
Beer Money Baron
 
Brujah's Avatar
 
Industry Role:
Join Date: Jan 2001
Location: brujah / gmail
Posts: 22,157
I wondered about that one too. I double-checked my logs and I didn't get a 404 for them. They were 200's.
__________________
Brujah is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 06:14 PM   #10
Socks
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto
Posts: 8,475
We just don't understand what....

Using the dir structure url will create a 404 so in the head of the script you gota place header("HTTP/1.1 200 OK");

that does specifically..

We understand the concept of changing the PHP to directories but don't get that top piece of code or what it's there for..
Socks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 06:23 PM   #11
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Just try it without this...

header("HTTP/1.1 200 OK");

If it works then no worries, if it doesnt then place it in

If I remember correctly unless their is an error return ok and run the script or some shit. IE if their is an error 404 it will return 200 ok and proceed to the script. Or some shit like that. Ofcourse I could be wrong

TheDoc
http://www.largecash.com
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 06:26 PM   #12
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
HTTP/1.1 means ?I too speak HTTP version 1.1?. The important bit, once more, is the bit on the same line with this that says 200 OK. This is an HTTP response, and in this case it means ?I understood your request and managed to fulfill it.? Users usually don't see responses, but there is one noteable exception: If you've been browsing the Web for some time, you might have come across a page that reads ?HTTP 404 Not Found? and then goes on to explain that the document you requested could not be found on the server; 404 is the HTTP response code that means exactly what it says, that the requested document was not found, just like 200 is the HTTP response code that says that everything went fine. There are a whole bunch of different responses defined in HTTP, but 200 is by far the most common and useful one.

TheDoc
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 07:46 PM   #13
dodo
Confirmed User
 
Join Date: Jan 2002
Posts: 162
Quote:
Originally posted by TheDoc
The above takes

http://www.domain.com/script.php?sex=yes&hot=no

and changes it to

http://www.domain.com/script/yes/no

TheDoc
http://www.largecash.com

how does that work.

so you direct that(/script/yes/no) with a 404 to the main page?
__________________
FREE TRAFFIC TRADING on any host. Also try our 200% traffic back program.Click here
We host the scripts for you so you trade on our bandwidth.
dodo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 08:45 PM   #14
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
That isnt easy for me to explain.


What it does is works like this....If you have a linking code to say a paysite.

IE:

http://www.domain.com/script.php?acc...0&site=massive

We know that the first var comming in is accountid and the second is the site.

So in the php of the script.php file I place in my arrays to split them in that order.

Array 0 is the script.php
Array 1 is the account id
Array 2 is the site

Example:

$var_array[0] = "script.php";
$accountid=$var_array[1];
$site=$var_array[2];

Now in apache (I cant remember the setting name) but you have to be able to set it up so if you type in something like:
domain.com/script and the dir script is not found it will look for a file called script in alpha order.

So by doing so it breaks down a url to a directory url.

http://www.domain.com/script/0000/massive

the dir script is really script.php
0000 is the account id
massive is the site

Drawbacks are you have to put full paths to images and other links or at least ../../blah.html ect cause the images/dir structure of the html will be script/0000/massive


Hope that help clears it up some.

TheDoc
http://www.largecash.com
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 09:18 PM   #15
Socks
Confirmed User
 
Industry Role:
Join Date: May 2002
Location: Toronto
Posts: 8,475
Great explanation, thanks for continuing to help out with this, we're implementing that now and we'll see how it works. The next question remains - any hosts that allow you to change the apache configuration without buying a dedicated server?
Socks is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 09:19 PM   #16
dodo
Confirmed User
 
Join Date: Jan 2002
Posts: 162
thanks for clearing that up

_
__________________
FREE TRAFFIC TRADING on any host. Also try our 200% traffic back program.Click here
We host the scripts for you so you trade on our bandwidth.
dodo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-31-2002, 10:20 PM   #17
E-van
Confirmed User
 
Join Date: Jul 2001
Location: Mex
Posts: 447
Quote:
Originally posted by Socks
Great explanation, thanks for continuing to help out with this, we're implementing that now and we'll see how it works. The next question remains - any hosts that allow you to change the apache configuration without buying a dedicated server?
Get in touch with me, I'm sure I can help you out with this part.

48690894
E-van is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.