Forbid POST command on specific pages

Namesniper

Verified User
Joined
Jan 5, 2007
Messages
89
Hello,

Is it possible to forbid the POST command on specific pages like index.php?
I have tried to forbid the POST on domain.com/index.php by placing instructions in .htaccess but it has affected other index.php's under the public_html directory.
Is it possible to lany how limit the POST on domain.com/index.php only?
 
Correct 301 moved permanently code

Hello,

I am trying to push my server to return Moved Permanently code and redirect these URLs to the main URL, but cant find the right code.
domain.com
w.domain.com
ww.domain.com
wwww.domain.com
to
www.domain.com

There are a number of codes available on the net and all supposed to do that, but which one is the eight one?

1)
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.com [nc]
rewritecond %{http_host} ^w.domain.com [nc]
rewritecond %{http_host} ^ww.domain.com [nc]
rewritecond %{http_host} ^wwww.domain.com [nc]
rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

2)
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteCond %{HTTP_HOST} ^w.example\.com
RewriteCond %{HTTP_HOST} ^ww.example\.com
RewriteCond %{HTTP_HOST} ^wwww.example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]

3)
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^w.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^ww.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} ^wwww.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
 
Back
Top