Jump to content


Photo

Apache Server with write_module support Question


  • Please log in to reply
No replies to this topic

#1 shawn2page

shawn2page
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 19 October 2006 - 01:26 AM



I am having some difficulties with this program I am using.  I have my site up and running and I am trying to ad a modification so when users set up a page on my site they can use there member name as a subdomain such as mysite.com/membername  similar to myspace.  Cuurently there member page shows there address like this http://gayitalk.com/profile.php?ID=23 , I downloaded the modification from online and where given these directiongs


1. Make sure you have compiled your Apache server with rewrite_module support and it's loaded in server configuration file (httpd.conf by default).
2. If you already have .htaccess file in your site script directory, then append it with this .htaccess file content.
3. If you haven't .htaccess file yet, then just copy it in your script root directory.
4. Copy rewrite_name.php file to script root directory also.
5. Enjoy it! :)

I am having trouble.  My host server responded with this when I asked them for help.

Thank you for contacting Online Support. The Apache server comes with the rewrite_module supported by default. You would need to check the httpd.conf file on your own.


Now I am just lost.  I uploaded the file they gave me in the download to my server.  Here is what the file (rewrite_name.php) includes in it.




******************/
@list($url, $vars) = explode('?', $_SERVER['REQUEST_URI']);
if( $url == '/' )
{
require_once('index.php');
exit;
}

$urlArr = explode('/', $_SERVER['REQUEST_URI']);
$rewriteNick = (strlen(trim($urlArr[count($urlArr) - 1])) ? $urlArr[count($urlArr) - 1] : $urlArr[count($urlArr) - 2]);
if ( !get_magic_quotes_gpc() )
{
$rewriteNick = addslashes($rewriteNick);
}
require_once( "inc/header.inc.php" );
require_once( "{$dir['inc']}db.inc.php" );
$profArr = db_arr( "SELECT `ID` FROM `Profiles` WHERE `NickName` LIKE '{$rewriteNick}' AND `Status` = 'Active'" );
if ($profArr)
{
$_REQUEST['ID'] = $profArr['ID'];
require_once( "{$dir['root']}profile.php" );
exit();
}
else
{
header("Location: {$site['url']}index.php");
}
?>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users