Earthtracker's Blog

Just another WordPress.com weblog

WordPress name in url string 404 page problem fix

I have been facing a problem in wordpress , when i was passing name string in page url like this format:
http://www.example.com/main/?item=5&cemail=testme%40test.com&ccountry=AU&name=testme
this taking me to 404 page.
if i remove the name parameter, then it was ok.
I have a got a good solution.
just write the following code in the file : root-> wp-config.php

unset($_GET['name']);

It was solved!

Advertisements
4 Comments »

Importing SQL dump in ubuntu

mysql  -u<username> -p  <database-name> < somedatabasetable.sql
Leave a comment »

Setup virtual host in ubuntu

Setup virtual host in ubuntu is pretty simple.

Hope you have already apache2 installed.

Now go to the location: /etc/apache2/sites-enabled
Open the file named ‘000-default’ as root.

You will find some line for default localhost .

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
       DocumentRoot /var/www
	<Directory />
		Options FollowSymLinks
		AllowOverride All
	</Directory>
......

Add the following line

ServerName localhost

Now copy the full section between

<VirtualHost *:80></VirtualHost>

under this part .
Change the code like below.

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	ServerName mydomain.com

	DocumentRoot /var/www/project-folder-name/
	<Directory />
		Options FollowSymLinks
		AllowOverride All
	</Directory>
	<Directory /var/www/project-folder-name/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

.......... 
</VirtualHost>

Others will remain same.

Save the file.

Now fine the host file from /etc/hosts
Add the following line

127.0.0.1	mydomain.com

Save the file.

Now restart your apache.
sudo /etc/init.d/apache2 restart

Enjoy browsing your new virtual host. 🙂

Leave a comment »