Home redirect to 404 not found when wrong url
Reply: 1

redirect to 404 not found when wrong url

ainodoramaaa 2
1#
ainodoramaaa 2 Published in 2018-01-06 07:47:50Z

i have a link like this

http://www.piratefiles.org/dorama/201214213/chase

i want when someone change original url for example like this

http://www.piratefiles.org/dorama/201214213/chasegasdfghasfdhga

then will redirect to 404 not found

u can try it. that my web.

my full .htaccess code

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

        RewriteCond %{HTTP_HOST} !^www\. [NC]
        RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
        RewriteRule ^([A-Za-z]+)/([0-9]+)/([\w-]+)/?$    view.php?cat=$1&idp=$2&post=$3&%{QUERY_STRING}   [NC,L]
        RewriteRule ^category/([\w-]+)/?$ category.php?cat=$1&%{QUERY_STRING}   [NC,L]

    # To externally redirect /dir/abc.php to /dir/abc
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(.+?)\.php[\s?] [NC]
    RewriteRule ^ /%1 [R=301,L,NE]

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.php -f
        RewriteRule ^(.+?)/?$ $1.php [QSA,NC,L]
</IfModule>

ErrorDocument 404 http://www.piratefiles.org/404.php
Nims Patel
2#
Nims Patel Reply to 2018-01-06 07:54:42Z

404.php

<?php
  header("HTTP/1.0 404 Not Found");
?>
<html>
  <head>
    <title>404 Error - Page Not Found</title>
  </head>
  <body>Your design</body>
</html>

.htaccess

ErrorDocument 404 /404.php 
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.333976 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO