htaccess codes not working
Posted by: seco (---.yalla.com)
Date: March 14, 2007 08:07AM

hi

any htaccess file not working on wamp but working on any server else !!
it gives me this error message
-------------------------------------------------------------------------------------------------------------------
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost 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.
--------------------------------------------------------------------------------------------------------------
how to solve any problem?

thanks in advance.

Options: ReplyQuote
Re: htaccess codes not working
Posted by: CyberSpatium (71.237.217.---)
Date: March 14, 2007 06:36PM

post the contents of your .htaccess file pls. also make sure it is named .htaccess. it will only work if it is named correctly.


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


Please visit my latest website Clarify Loans:
ClarifyLoans.com

Options: ReplyQuote
Re: htaccess codes not working
Posted by: seco (217.54.151.---)
Date: March 14, 2007 11:08PM

thanks for reply

the content of htaccess file
------------------------------------------------------------
<Files *.txt>
order allow,deny
deny from all
</Files>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ download.php?file=$1 [L]

php_value upload_max_filesize 250M
php_value post_max_size 250M
----------------------------------------------------------------

by the way this is script i have downloaded (not my script)

thanks in advance.

Options: ReplyQuote
Re: htaccess codes not working
Posted by: CyberSpatium (71.237.217.---)
Date: March 15, 2007 12:09AM

make sure you have enabled mod_rewrite support, wamp comes with that setting disabled. so you will need to enable it

open your httpd.conf file ( c:\wamp\apache2\conf\httpd.conf )

find
#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, restart apache for the new setting to take effect.



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


Please visit my latest website Clarify Loans:
ClarifyLoans.com

Options: ReplyQuote
Re: htaccess codes not working
Posted by: seco (217.54.151.---)
Date: March 15, 2007 07:45AM

Thanks for reply

it works !!

one final question please i have alot of scripts (about 70%) that gives me this error and when i upload it to apache server it works and don't gives me this error

the error is
--------------------------------------------------------
Parse error: parse error, unexpected $end in C:\wamp\www\filename.php on line (number)
--------------------------------------------------------
is there any modules that i can enable to correct this error?

thanks in advance.

Options: ReplyQuote
Re: htaccess codes not working
Posted by: CyberSpatium (71.237.217.---)
Date: March 15, 2007 11:04AM

make sure you have all proper opening and closing braces.

if you have any block echos in our script, make sure there are no spaces.

// ok block echo code example
echo <<<END
END;

// bad block echo code example
echo <<<END
     END;


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


Please visit my latest website Clarify Loans:
ClarifyLoans.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.