Jump to content


This topic is now archived and is closed to further replies.


Apache Server with write_module support Question

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 == '/' )

$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" );
header("Location: {$site['url']}index.php");

Share this post

Link to post
Share on other sites


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.