Removing www. from url [SOLVED]

Forum
Last Post
Threads / Messages

arlecchina

Member
Member
Joined
Feb 11, 2009
Messages
65
Points
0
Mysidian Dollar
0
I am running a test site on my computer. The url is http://localhost/
How do I remove the www. from automatically inserting into every URL?

Thanks for any information in advance.
 
RE: Removing www. from url

It shouldn't be auto-adding a www. to the links. What links in particular is this happening on? I can take a look at the code for those specific links. Also, in inc > config.php your domain doesn't have www. in it, correct? :)
 
RE: Removing www. from url

BMR777 said:
It shouldn't be auto-adding a www. to the links. What links in particular is this happening on? I can take a look at the code for those specific links. Also, in inc > config.php your domain doesn't have www. in it, correct? :)
There's no www. in the domain.
PHP:
$domain = 'localhost';    			//Your domain name (No http, www or . )
$scriptpath = 'directory';		//The folder you installed this script in

I was only assuming that it was the www. that is the problem. But now since you said that the www. isn't automatically inserted...i'm not sure what the problem could be.

I am using WAMP.
I know that the config.php file is correct regarding database, database user and password. I am unsure if I am inputting the right "domain" (in quotes since it's not a domain...it's local host) and directory.

When you go the site locally it's supposed to be

http://localhost/directory/

however I get a 500 Internal Server Error.

Any ideas why?
 
RE: Removing www. from url

Do you have any .htaccess files anywhere in there? Sometimes .htaccess files are the cause of 500 errors. You can remove the .htaccess files from the picuploads > gif and picuploads > jpg folders and see if that makes a difference. Also, the .htaccess file in the main adoptables script directory may cause issues if you have enabled it for shorter picture URLs in signatures.

Let me know if that helps. :)
 
RE: Removing www. from url

That helped! Thank you very much.

However, now the local host site loads but at the top of the page are all these notices which are NOT on the live online site.

Do you think it has to do with the PHP version? My online host is running
5.2.5 but my local host is running 5.3.0.
Notice: Undefined variable: nid in C:\Program Files\wamp\www\directory\lang\lang.php on line 566

Notice: Undefined variable: nid in C:\Program Files\wamp\www\directory\lang\lang.php on line 570

Notice: Use of undefined constant loginstatus - assumed 'loginstatus' in C:\Program Files\wamp\www\directory\inc\functions.php on line 133

Notice: Use of undefined constant username - assumed 'username' in C:\Program Files\wamp\www\directory\inc\functions.php on line 134

Notice: Use of undefined constant loginstatus - assumed 'loginstatus' in C:\Program Files\wamp\www\directory\inc\functions.php on line 166

Notice: Use of undefined constant username - assumed 'username' in C:\Program Files\wamp\www\directory\inc\functions.php on line 167

Notice: Use of undefined constant content - assumed 'content' in C:\Program Files\wamp\www\directory\inc\functions.php on line 59

Notice: Use of undefined constant title - assumed 'title' in C:\Program Files\wamp\www\directory\inc\functions.php on line 60

Notice: Use of undefined constant title - assumed 'title' in C:\Program Files\wamp\www\directory\profile.php on line 42

Notice: Use of undefined constant content - assumed 'content' in C:\Program Files\wamp\www\directory\profile.php on line 43

Notice: Use of undefined constant loginstatus - assumed 'loginstatus' in C:\Program Files\wamp\www\directory\inc\functions.php on line 133

Notice: Use of undefined constant username - assumed 'username' in C:\Program Files\wamp\www\directory\inc\functions.php on line 134

Notice: Use of undefined constant loginstatus - assumed 'loginstatus' in C:\Program Files\wamp\www\directory\profile.php on line 59

Notice: Use of undefined constant username - assumed 'username' in C:\Program Files\wamp\www\directory\profile.php on line 60

Notice: Undefined index: page in C:\Program Files\wamp\www\directory\profile.php on line 72

Notice: Undefined variable: article_date in C:\Program Files\wamp\www\directory\profile.php on line 288

Notice: Use of undefined constant loginstatus - assumed 'loginstatus' in C:\Program Files\wamp\www\directory\inc\functions.php on line 133

Notice: Use of undefined constant username - assumed 'username' in C:\Program Files\wamp\www\directory\inc\functions.php on line 134

Notice: Use of undefined constant loginstatus - assumed 'loginstatus' in C:\Program Files\wamp\www\directory\inc\functions.php on line 312

Notice: Use of undefined constant username - assumed 'username' in C:\Program Files\wamp\www\directory\inc\functions.php on line 313
 
RE: Removing www. from url

I don't think these are anything to worry about, as they are simply debug notices and not anything critical. You can hide them by making the following change to your localhost server's php.ini file:

http://forum.mamboserver.com/showpost.php?s=2103d7feb6a94d8c0c0270a6b56ad1fb&p=384326&postcount=4

They're only there for debugging and don't show up on the live server because reporting of notices is usually disabled on production servers. :)
 
RE: Removing www. from url

Thanks Brandon. You've been a big help.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,278
Messages
33,127
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top