Forum Moderators: phranque
I tried RewriteRule ^(.*)/+$ $1 [R=301,L] http://example.net/home3/pintotou/public_html/Asia/Indonesia/bali.php
http://example.net/Asia/Indonesia/bali.php
http://example.net/Asia/Indonesia/bali.php
[edited by: phranque at 9:30 am (utc) on Feb 21, 2014]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
RewriteRule ^(.*)/+$ $1 [R=301,L] http://example.net/home3/pintotou/public_html/Asia/Indonesia/bali.php
http://example.net/Asia/Indonesia/bali.php
http://example.net/Asia/Indonesia/bali.php/
[edited by: phranque at 9:31 am (utc) on Feb 21, 2014]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
http://example.net/home3/pintotou/public_html/Asia/Indonesia/bali.php
without the htaccess code I am getting
http://example.net/Asia/Indonesia/bali.php/
RewriteRule ^(.+?)/+$ http://www.example.com/$1 [R=301,L] [edited by: phranque at 9:33 am (utc) on Feb 21, 2014]
[edit reason] exemplified quote [/edit]
[edited by: phranque at 9:31 am (utc) on Feb 21, 2014]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
[edited by: incrediBILL at 1:29 am (utc) on Feb 23, 2014]
[edit reason] example.com, again... [/edit]
[edited by: phranque at 3:28 pm (utc) on Feb 21, 2014]
[edit reason] exemplified domain [/edit]
header("location: ".$_SESSION['current'] . "/");
Firefox has detected that the server is redirecting the request for this address in a way that will never complete
Redirect 301 /Pinto/oldindex.html http://example.net/Pinto/oldindex.php and the expected page, the index page should http://example.net
RewriteCond %{REQUEST_URI} ^/(.+)/$
RewriteRule \.html/ http://www.example.net/%1 [R=301,L] # Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php
Options -Indexes
AddType text/x-component .htc
# allow all except those indicated here
<Files *>
order allow,deny
allow from all
</Files>
# block visitors referred from indicated domains
RewriteEngine on
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymlinks
Options +SymLinksIfOwnerMatch
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* [F,L]
#no idea what this is for. it has my ip address
RewriteCond %{HTTP_HOST} ^173\.254\.28\.21
RewriteRule (.*)$ http://example.net/$1 [R=301,L]
RewriteCond %{QUERY_STRING} ^(.*)=http [NC]
RewriteRule ^(.*)$ [F,L]
#redirect from www
RewriteCond %{HTTP_HOST} ^www.example\.net$ [NC]
RewriteRule ^(.*)$ http://example.net/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://example.net/$1 [R=301,L]
Redirect 301 /Pinto/oldindex.html http://example.net/Pinto/oldindex.php
Redirect 301 /Asia/Indonesia/bali.html http://example.net/Asia/Indonesia/bali.php
Redirect 301 /Asia/Indonesia/indonesia.html http://example.net/Asia/Indonesia/indonesia.php
#bandwidth theft
RewriteCond %{HTTP_REFERER} !^http://example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC,L] [edited by: phranque at 9:39 am (utc) on Feb 22, 2014]
[edit reason] PLEASE USE EXAMPLE.COM [webmasterworld.com] [/edit]
#no idea what this is for. it has my ip address
RewriteCond %{HTTP_HOST} ^173\.254\.28\.21
RewriteRule (.*)$ http://example.net/$1 [R=301,L]
[edited by: phranque at 9:38 am (utc) on Feb 22, 2014]
[edit reason] exemplified quote [/edit]
RewriteCond %{QUERY_STRING} ^(.*)=http [NC]
RewriteRule ^(.*)$ [F,L]
It id my own SHARED IP.
#no idea what this is for. it has my ip address
RewriteCond %{HTTP_HOST} ^173\.254\.28\.21
RewriteRule (.*)$ http://example.net/$1 [R=301,L]
RewriteCond %{QUERY_STRING} ^(.*)=http [NC]
RewriteRule ^(.*)$ [F,L] [edited by: phranque at 9:36 am (utc) on Feb 22, 2014]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
RewriteCond %{QUERY_STRING} http [NC]
RewriteRule .* [F] [edited by: phranque at 10:43 pm (utc) on Feb 23, 2014]
[edit reason] fixed typo [/edit]
This rule blocks certain types of malicious requests
# Use PHP5.4 Single php.ini as default
AddHandler application/x-httpd-php54s .php
Options -Indexes
AddType text/x-component .htc
# allow all except those indicated here
<Files *>
order allow,deny
allow from all
</Files>
# block visitors referred from indicated domains
RewriteEngine on
# For security reasons, Option followsymlinks cannot be overridden.
#Options +FollowSymlinks
Options +SymLinksIfOwnerMatch
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* [L]
#bandwidth theft
RewriteCond %{HTTP_REFERER} !^http://example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://example.net$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.example.net$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [L,NC]
#redirect from www
RewriteCond %{HTTP_HOST} ^www.example\.net$ [NC]
RewriteRule ^(.*)$ http://example.net/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://example.net/$1 [R=301,L]
Redirect 301 /Pinto/oldindex.html http://example.net/Pinto/oldindex.php
Redirect 301 /Asia/Indonesia/bali.html http://example.net/Asia/Indonesia/bali.php
Redirect 301 /Asia/Indonesia/indonesia.html http://example.net/Asia/Indonesia/indonesia.php [edited by: phranque at 11:21 am (utc) on Feb 23, 2014]
[edit reason] example.net [/edit]