Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. 🚫 No AI-generated (LLM) posts allowed. Share your own thoughts and experience — accounts may be terminated for violations.

Multiple domains redirected to PPC

Status
Not open for further replies.

dvdrip

Level 9
Legacy Exclusive Member
Joined
Jul 21, 2002
Messages
2,782
Reaction score
24
I have about 30 domains hosted all together.
I use php to parse the URL and redirect the user to the appropiate URL.
(e.g. sedo.co.uk/parking/mydomain.com)

The problem is with 404 requests.
I use htaccess:

ErrorDocument 404 /index.php

but it doesn't work.

Anyone knows why or has a betted idea on how to do this?
 

Frontline

DNF Regular
Legacy Exclusive Member
Joined
Nov 18, 2002
Messages
696
Reaction score
0
Maybe the server isn't going to the right dir with just a /index.php location and looking for that file in the incorrect folders that visitors are trying to access. I would suggest just typing out the full url and seeing if that solves everything. I use the following for my htaccess and it works fine:

ErrorDocument 400 http://www.sedo.co.uk/parking/xxx
ErrorDocument 403 http://www.sedo.co.uk/parking/xxx
ErrorDocument 404 http://www.sedo.co.uk/parking/xxx
ErrorDocument 500 http://www.sedo.co.uk/parking/xxx
ErrorDocument 501 http://www.sedo.co.uk/parking/xxx
ErrorDocument 503 http://www.sedo.co.uk/parking/xxx
 

dvdrip

Level 9
Legacy Exclusive Member
Joined
Jul 21, 2002
Messages
2,782
Reaction score
24
The whole url works but I have many domains hosted all together.
How do I make them go to the correct sedo page?
I need xxx to be different in each case.
 

hotdog_pk

Level 6
Legacy Platinum Member
Joined
Mar 13, 2004
Messages
501
Reaction score
0
i prefer to have one page, index.php in the site root.

when forwarding the url via the registrar you can pass a few variables.

for example: http://domain.com/?r=dnforum.com&s=search
This method works with frames so you can keep the address bar intact.

now. inside the index.php place the following:
index.php - start said:
<?php
$domain = $_REQUEST['r'];
$search = $_REQUEST['s'];
?>
.... This gets the variables (after the "?" in the forward URL)

now you can play around with the variables...
CODE 2 said:
<?php
echo $domain; //prints the domain, for example dnforum.com

echo "www." . $domain; //Prints the domain with 'www.', for example www.dnforum.com

$q = "SELECT * FROM table WHERE description LIKE %'$search'%";
$sql = mysql_query($q);
// Just the start of a query to search a database, of say, affiliates
// Im in college at the moment and dont have time to do anything else

?>

hope this helps, it works.
i was going to write a full script on this but stopped because i have no longer got any time(I was going to add a lot more features than explained above). i started the script from another forum and lots others wanted to be able to keep the url in the address bar like ultsearch, this script allows you to do this without your own nameservers.
 

cyphix

Level 9
Legacy Platinum Member
Joined
Jan 20, 2003
Messages
3,609
Reaction score
1
Hey dvdrip... try this in all your .htaccess files.

Code:
ErrorDocument 404 http://domain.com/index.html

Redirect /index.html http://www.sedo.us/parking/domain.com

Let me know if that works. :)
 

dvdrip

Level 9
Legacy Exclusive Member
Joined
Jul 21, 2002
Messages
2,782
Reaction score
24
cyphix this works if you have one domain.

I use:

ErrorDocument 404 /index.html

and it won't work.
 

cyphix

Level 9
Legacy Platinum Member
Joined
Jan 20, 2003
Messages
3,609
Reaction score
1
Don't u have all your domains setup seperately? Just use that in all their root .htaccess
 

dvdrip

Level 9
Legacy Exclusive Member
Joined
Jul 21, 2002
Messages
2,782
Reaction score
24
No, I have them all together. I said that in my first post.
I don't want them hosted seperately cause it takes too much space (5MB instead of 1000x5MB), it is too much work(1000 .htaccess files!!!) etc.
 
Status
Not open for further replies.

Who has viewed this thread (Total: 1) View details

Who has watched this thread (Total: 3) View details

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Members Online

Premium Members

Upcoming events

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators

Top Bottom