0

I don't want to redirect to home page when there is no page or wrong url. I have following in httaccess file

# BEGIN WordPress
RewriteRule ^sitemap.xml sitemap-%{SERVER_NAME}.xml [L]
RewriteRule ^sitemap.xml.gz sitemap-%{SERVER_NAME}.xml.gz [L]
RewriteRule ^index\.php$ - [L]
ErrorDocument 404 /404.php
ErrorDocument 404 /index.php?error=404

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]


# END WordPress

I have already 404.php in my theme folder. Let me know what to modify.

9
  • Do you have this problem with a less modified .htaccess file?
    – s_ha_dum
    Commented Jun 30, 2013 at 16:27
  • Yes...I commented the above one, pasted and checked ...still persist.
    – Brij
    Commented Jun 30, 2013 at 16:42
  • You are better off renaming your existing .htaccess and letting WordPress generate a new one. Switch themes and disable your plugins. Ordinarily WordPress does not load the home page for 404s if there is a 404.php in the theme. Do you have live URL?
    – s_ha_dum
    Commented Jun 30, 2013 at 16:45
  • Thank for reply...I'll check ...live url: techbrij.com
    – Brij
    Commented Jun 30, 2013 at 16:49
  • I get http://techbrij.com/cgi-sys/suspendedpage.cgi and can't see anything else.
    – s_ha_dum
    Commented Jun 30, 2013 at 17:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.