htaccess possible?
Posted by: sjku (---.net)
Date: May 04, 2007 02:00PM

Hi,
Thanks for the help on my mail issue. I got 1 more question.

When I put a .htaccess file in the root directory, it gives me a 500 internal server error. The .htaccess works fine on the linus server (where the final website resides), but here on "windows" it gives the error.
I searched a little and found an article where they said that the htaccess needs to be renamed as "ht.acl" on windows. So I did it, and changed the entry in apache conf also, but still doesn't work.
Can you please suggest something?
Thank you.

Options: ReplyQuote
Re: htaccess possible?
Posted by: CyberSpatium (71.237.217.---)
Date: May 04, 2007 06:45PM

..htaccess files need to be named .htaccess or they will not work. this is true on any OS that that apache installed (windows, linux, mac, solaris, etc).

when your upload your .htaccess files from linux server and put them on your windows server, you will need to update any linux paths in the file to their proper windows paths:

for example change:

/home/svr/users/someone/public_html/somefile.ext

to
c:\wamp\www\somefile.ext


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Web Development Newbie Blog

Options: ReplyQuote
Re: htaccess possible?
Posted by: jtripper (---.cable.ubr06.brad.blueyonder.co.uk)
Date: May 05, 2007 01:05PM

if you open the .htaccess file in notepad then save it as

".htaccess"

with the quotes you can get it to work

Options: ReplyQuote
Re: htaccess possible?
Posted by: sjku (---.net)
Date: May 05, 2007 07:43PM

Hi,
No luck... I still keep getting 500 internal server error.
This is what I have in ".htaccess"

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.+)\.html$ $1.php [L]

I appreciate you helping me in this matter.
Thank you!

Options: ReplyQuote
Re: htaccess possible?
Posted by: CyberSpatium (71.237.217.---)
Date: May 05, 2007 11:32PM

you need to enable mod_rewrite for apache. dont worry, this is an simple process.

start wamp if it is not already started -> left click on the wamp tray icon -> config files -> httpd.conf.

find this line:
#LoadModule rewrite_module modules/mod_rewrite.so

to enable it, remove the pound sign in front like this
LoadModule rewrite_module modules/mod_rewrite.so

save the file and restart apache for the new setting to take effect.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Web Development Newbie Blog

Options: ReplyQuote
Re: htaccess possible?
Posted by: sjku (---.net)
Date: May 06, 2007 05:48AM

Perfect!!!
It worked! A million thanks to you!
Is there any such module for "VirtualHost" as well? I'm trying to get it to work for the last 2 days, but with no luck at all...
I'm using the apache virtual host setup guide located at:
[httpd.apache.org]

From my domain panel I made a server name like:
ns1.domain.com which points to IP of my wamp computer.
When I type [ns1.domain.com], it opens the site, but when I type www.domain.com it doesn't find the page...
I know I'm doing something wrong, but can't seem to figure out what...
Thank you again for the htaccess problem.

Options: ReplyQuote
Re: htaccess possible?
Posted by: CyberSpatium (71.237.217.---)
Date: May 06, 2007 06:37AM

search this forum for virtual host, virtual hosting, and dynamic dns.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Web Development Newbie Blog

Options: ReplyQuote
Re: htaccess possible?
Posted by: sjku (---.net)
Date: May 07, 2007 07:47AM

Hi Cyber,
I tried a lot of stuff, but no luck still... Only ns1.domain.com is connecting to server.
This is what I added in virtual host section:
(IP is fake below...)

Can you please take a look at this and suggest changes? Thanks.

ServerName 111.111.111.111:80
#ServerName ns1.domain.com:80

NameVirtualHost 111.111.111.111:80
#NameVirtualHost *:80
<VirtualHost 111.111.111.111:80>
DocumentRoot C:/wamp/www/
ServerName ns1.domain.com
</VirtualHost>
<VirtualHost 111.111.111.111:80>
ServerName www.domain.com
#ServerAlias domain.com *.domain.com
DocumentRoot C:/wamp/www/site
</VirtualHost>

In my domain control panel, there's an option to add an IP to a domain and make a "child server". There I have added "ns1" and added the IP.
Then in "name server" section I placed: ns1.domain.com

I'm not sure if that's even connecting properly...
Any suggestions for me please?
Thank you.

Using your wamp manual, I also managed to "password" protect the phpmyadmin "directory". Thank you for that .htaccess and .htpasswd guide.
Thanks

Options: ReplyQuote
Re: htaccess possible?
Posted by: sjku (---.net)
Date: May 07, 2007 11:33AM

Ok, now the ns1.domain.com is also not showing up...
I changed:
ServerName 111.111.111.111:80
#ServerName ns1.domain.com:80

to:

#ServerName 111.111.111.111:80
ServerName ns1.domain.com:80

Then I changed things back, but the ns1 is down still...
I have no idea what I messed up.
Thanks

Options: ReplyQuote
Re: htaccess possible?
Posted by: CyberSpatium (71.237.217.---)
Date: May 07, 2007 01:42PM

you will need dynamic dns setup to make this work. you will need to signup for a dynamic dns service like zoneedit.com or everydns.net. you will need to tie your ip address to your domain name using what is called an A record.

if you dont have any idea what i am talking about, then sign up for an account at www.everydns.net and then give me your user id, password, your domain name, and ip address and i will take care of that for you. do not post your user id and password here in this forum. use the contact me form on my blog to send me your details:
Contact Me Form

when you sign up for an account at everydns.net, they tell you that you need to set your domain names name servers to:
ns1.everydns.net
ns2.everydns.net
ns3.everydns.net
ns4.everydns.net


you need to login to wherever you registered your domain name and set your domain name to use these name servers.

if you use GoDaddy like i do, this is an easy process. just login to your account, go to your domain name overview page. click on the domain name you want to use. now click on the nameserver link in the menu. now enter these 4 nameserver addresses and click on ok. one note on changing nameserver settings. if you do not use GoDaddy, it will take 12-24 hours for your domain name to propagate through the system, and will until it has been fully propagated. if you use godaddy, it only takes a few minutes, so you should be ready right away.

to see if the nameservers have propagated, test your domain name at dnstools.com. when it you see ns1.everydns.net, ns2.everydns.net, ns3.everydns.net etc then your domain name has fully propagated.

you now need a place on your server for all your virutal host accounts. i put mine in a folder called users the wamp directory:
c:\wamp\users

i then create a separate folder for all the domain names. to make things easy to remember and easier to edit files, i suggest you use the domain name as the folder name. so, for the example domain name i use in the virtual host example i use below, i use the domain domain.com. so, create a folder called domain.com in the users folder like this:
c:\wamp\users\domain.com

now create a folder called public_html and logs in the domain.com folder. the public_html folder will be the document root for that domain, so put all your domain name's website files there (html, css, php, images, etc). the logs folder is where you apache access and error logs for that domain name will be stored.

now you need to make a few changes in your apache config files.

edit your httpd.conf file and change:
ServerName 111.111.111.111:80

change it back to:
ServerName localhost:801

then open your httpd-vhosts.conf file (c:\wamp\apache2\conf\extra\httpd-vhosts.conf )and add:

NameVirtualHost *:80

<VirtualHost *:80>
ServerAdmin admin@domain.com
DocumentRoot C:/wamp/www
ServerName domain.com
</VirtualHost>


save the file and restart apache for the new setting to take effect.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Web Development Newbie Blog

Options: ReplyQuote
Re: htaccess possible?
Posted by: sjku (---.net)
Date: May 07, 2007 07:01PM

Once again, a million thanks!
I think it's working now...
You must be an expert in all hosting and stuff! I could not have fixed these 2 things without you. I'm Honestly thankful to you.
Thanks for offering to setup the DNS for me.
DNS I think is set now, and I'll later try something with subdomains.

Thank you again.
Regards

Options: ReplyQuote
Re: htaccess possible?
Posted by: CyberSpatium (71.237.217.---)
Date: May 07, 2007 07:17PM

you will need to use dynamic dns to use a domain name with wamp.

I just noticed i made a typo and left a few lines out in my post above. you need to use this setting for virtual host:

<VirtualHost *:80>
ServerAdmin admin@domain.com
DocumentRoot "C:/wamp/users/domain.com/public_html"
ServerName domain.com
ErrorLog C:/wamp/users/domain.com/logs/error.log
CustomLog C:/wamp/users/domain.com/logs/access.log common
</VirtualHost>


sorry for the error.

CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Web Development Newbie Blog

Options: ReplyQuote
Re: htaccess possible?
Posted by: sjku (---.net)
Date: May 07, 2007 08:48PM

Thank you for the additions.
I'm truly grateful to you for all the help. Also if not for your manual, I would have gone live without any protection for phpmyadmin and other personal folders...
I'm good at php and stuff, but configuring apache is a totally different thing. I'll be reading your blog more often. You got some really useful stuff there.
Thank you!

Options: ReplyQuote
Re: htaccess possible?
Posted by: CyberSpatium (71.237.217.---)
Date: May 08, 2007 01:03AM

yeah, i have been to many, many, many forums, blogs, etc on the net for the web development community. they are all aimed for seasoned web developers, and not very friendly for newbies looking for any kind of help. and then when some newbie asks for help, they get answers that are so full of 'tech speak' the newbie has no idea what they are talking about. so, i have tailored my blog for the newbies. i try to speak as little tech speak as possible.

for example, here is a link to a tutorial tailored for newbies on how improve their google adsence ads and make more money.
http://webdevnewbie.com/2007/05/06/5-tips-to-boost-your-adsense-revenue/

I am looking for contributers, authors, and commentators for my blog. these are not paid positions, but you would be helping out newbies on their path to becoming web pros.


CyberSpatium
----------------------
WAMP English Forum Admin

Need help? Check out my WAMP User Manual/Guide here!

Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Web Development Newbie Blog

Options: ReplyQuote
Re: htaccess possible?
Posted by: sjku (---.net)
Date: May 08, 2007 01:24PM

Looks like both of us share similar interest, however you are much more "dedicated" and needless to say, more knowledgeable than I am...
I have a few tools that you "might" like and if you find them good enough, feel free to mention them on your blog.

One of them is an Rss file creator:
[www.website-design-software-india.com]

There are a few more tools on that site which might be useful for newbe.
I just got my sites checked by people "outside my internet connection area", and they said that all sites are showing up fine "from different ISP'S".
Thanks to you!

Anything I need to do to enable subdomains?
Best Regards

Options: ReplyQuote


Sorry, only registered users may post in this forum.