PDA

View Full Version : Mod_Rewrite



dead-poetic
10-24-2005, 07:15 PM
I want to use mod_rewrite. when you go to http://domain.com/conact_us/contact/webmaster/ it is same as http://domain.com/conact_us.php?contact=webmaster. here is the code that I am using(got the code from http://www.webmaster-toolkit.com/mod_rewrite-rewriterule-generator.shtml):
Options +FollowSymLinks
RewriteEngine on
RewriteRule conact_us/(.*)/(.*)/$ /conact_us.php?$1=$2 but I get this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache Server at localhostWhat is wrong, I am running Apache 1.3.29, mod_rewrite is enabled, PHP 4.3.4.

insanemonkey
10-26-2005, 05:40 PM
I was just wondering, what is the use of a mod rewrite?

dead-poetic
10-26-2005, 06:54 PM
you can read about it here (http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html).

Twey
10-27-2005, 12:05 PM
It exposes the underlying technology of the website... This can give potential hackers clues as to what type of data they should send along with the query string to perform a ‘front-door’ attack on the site. Information like this shouldn’t be given away if you can help it.
And if you ever have to rely on such "security by obscurity," your site is already so insecure that it's not worth the bother.

nikomou
11-11-2005, 01:12 PM
why dont you try:



RewriteEngine On
RewriteRule contact_us/contact/(.*)/ contact_us.php?contact=$1