Jump to content

Apache Server with write_module support Question


shawn2page

Recommended Posts



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");
}
?>
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.