English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Example:

My site views as www.mysite.com/contact.html or .php

I want make it show as www.mysite.com/contact .Without any extension.
Does anyone know? Helping me would be appreciated. thanks

2007-11-16 18:44:36 · 3 answers · asked by Anonymous in Computers & Internet Other - Computers

"King Goilio", can you explain it more clearly? I tried it, but didn't work.

2007-11-18 14:58:58 · update #1

I also found it here:

http://forums.hostgator.com/showthread.php?t=22363

,but it didn't work though.

2007-11-18 15:00:56 · update #2

Thanks, NC
I have one more final question.
My website show:
www.mysite.com/contact/
but here is different,
http://mintidea.ca/why-choose-mint-idea
Can you explain why it is diffrent?
And I already know how to re-link css and images by url ,but i want to do it this way...

li.leaf {
list-style-type: square;
list-style-image: url(../../misc/menu-leaf.png);
padding: 0.2em 0.5em 0 0;
margin: 0;
}
So what is ../../ meant?


Thanks alot.

2007-11-19 20:20:07 · update #3

3 answers

The easiest way is to create a contact page at mysite.com/contact/index.php or mysite.com/contact/index.html. This way, you can have a valid mysite.com/contact URL without having to play with mod_rewrite, which, in addition to being fairly complicated for a new user, may or may not be available on your system.

2007-11-19 08:14:31 · answer #1 · answered by NC 7 · 1 0

It would be very hard to explain Apache's mod_rewrite here in just one post.

You can read on it at:
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

In the meantime make sure that mod_rewrite is enabled.

If you absolutely must be able to hit the page using www.mysite.com/contact before you can figure out why the Rewrite rule is not working, then just simply create a directory called "contact" under you root directory, move the contact.html inside the contact directory and rename contact.html to index.html (or whatever your directory index is set to).

That can be an emergency temporary solution until you get mod_rewrite to work how you want.

Hope this helps.

2007-11-19 06:01:15 · answer #2 · answered by Anonymous · 0 0

Laymans terms.. ok here we go! HTML is used to make what you see on a webpage (in conjunction with other things) but it cannot process forms or take variables or anything like that. so enter PHP. it is a programming language that runs server side to do computations from HTML. when you fill out a form and hit submit in HTML chances are its sending that information to a PHP script to compute something (though it could be PERL or ASP). in a very basic example, say you wanted to let a user type their name in and have that name flash across the screen. PHP lets you store the name they type in in a variable and then recall that variable and display it. you could not do that in simple HTML. mysql is a databasing language that creates databases to store information. PHP goes hand in hand with it because it is easy to integrate. a common example is forums. when you sign up all your information is stored in a table in mysql and PHP is used to process it. any post you make ona forum is then stored in the database, and you can retrieve it when you wanna view a thread. it is true you cannot see PHP by viewing the source of the page, it is embedded, as you say. information from a html form is sent to a php script, but then the script sends soemthing back after processing, and that is displayed in another html page. thats not to say that you cannot use php to format a page, but it is long winded and you generally end up expressing html tags through php, which is just pointless. hope all that helps!

2016-05-23 22:53:31 · answer #3 · answered by ? 3 · 0 0

fedest.com, questions and answers