4
votes
1answer
43 views

Statically mapping a PHP script to another script using an .htaccess file results in 404 errors

After having read a lot of posts on the topic of URL rewriting, I still remain stuck with 404 status errors. My goal: A 'static' rewrite of URLs, as follows (user clicks or enters the one ...
1
vote
1answer
127 views

Htaccess redirecting 404 URLs to Index page

I am trying to setup my htaccess file such that all 404 pages are permanently redirected to the home/index page using 301. After I configure the htaccess file I try to test that it is working ...
2
votes
3answers
108 views

Check for URLs that return my 404 error page

I have made a custom 404 error page called error_404.html In my .htaccess I inserted: ErrorDocument 404 /error_404.html In order to control/correct 404 errors in my website, I would like to know ...
2
votes
1answer
93 views

How to noindex a 404 page using .htaccess?

I have several 404 not found pages which I would like to noindex through .htaccess. how do I do it with X-Robots-Tag?
1
vote
1answer
79 views

My Server is returning a 404 instead of 403 when access if forbidden - is it good or bad?

via .htaccess, I forbid access to folders that have no index page inside (domain.com/images for example), and also block my site completely for several user-agents (such as wget). When I test to see ...
2
votes
2answers
229 views

Error 404 after rewrite query strings with htaccess

I'm trying to redirect the URLs of a client's website like this: www.localsite.com/immobile.php?id_immobile=24 In something like this: www.localsite.com/immobile/24.php I'm using this rule in ...
2
votes
1answer
285 views

URL/Crawl Errors continue to increase after pharma hack

I'm working with a site that was hacked a couple of months ago and was sending out a ton of spam. The problem seemed to have started with a dormant WordPress blog that was part of the site (so the ...
0
votes
2answers
323 views

Does it make sense to throw a 404 error with PHP?

Problem Description Hi, The current setting of my .htaccess file does not allow any kind of 404 (as far as I know). I mean, it captures every kind of url like mysite.com/asfasfasf then sends it to ...
1
vote
0answers
81 views

Website starts showing 404 after 301 redirects via .htaccess [closed]

One of my clients websites started getting 404 messages on some pages after doing 301 redirects via .htaccess file. I don't understand why that happens, could someone tell me what went wrong? The ...
1
vote
1answer
465 views

Separate 404 page for subdirectory

I've made a subsite which runs under mydomain.com/subsite - idealy from an architecture point of view it would be under a subdomain, but we wanted the links to come back to the main domain. The sub ...
0
votes
1answer
446 views

How to fix this 404 soft error?

I have a static HTML website. www.example.com/?12345 (this page doesn't exist) redirects to www.example.com and www.example.com/page.html?12345 redirects to www.example.com/page.html. I don't know ...
3
votes
1answer
3k views

How to redirect specific url to 404 in htaccess?

I want to redirect only one specific URl (ex. mypage.com/1234/page/) to error page 404. How to achieve it in htaccess?
2
votes
2answers
276 views

Send 404 Status Code on www.example.com

Does anyone know if it's at all possible (preferably with .htaccess), to send a 404 error code and page when visiting http://www.example.com but have http://example.com working just fine? I want to ...
1
vote
1answer
180 views

Is it possible to use two different ErrorDocuments for different paths of a website?

I currently run PmWiki at mydomain.com/pmwiki. I have a 404 page and .htaccess set up in my site's document root for 404 pages regarding anything that doesn't have to do with my wiki. By default, ...
1
vote
0answers
314 views

404 error on a file/directory that exists?

We are using the vBulletin system. I have set it up so that it redirects 404 error's to a php page, so it follows the theme of the forum. However, if I go to a directory that exists (the admin ...
2
votes
3answers
3k views

.htaccess - if the file doesn't exist, rewrite to index.php but send 404 instead of 200

I have a catchall .htaccess directive like this: RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ index.php [L] Anything that doesn't exist and the URL is ...
6
votes
1answer
2k views

.htaccess rule to redirect from 404 to search results

When a user (or a bot) request on non existing page, I want to redirect him to the search results. I prefere to do it with the .htaccess file using something like: ErrorDocument 404 ...
0
votes
1answer
451 views

Htaccess 404 & 301

The site is run on wordpress (latest) and is installed in /htdocs/www/ This htaccess file is in /htdocs/www/roh/ along with a bunch of images & some css. I want requests to the old html files to ...
1
vote
4answers
1k views

Why is Joomla based website that was copied off of live server into localhost not showing pictures and throwing 404 error?

I have copied Joomla based website via FTP onto my machine and I am trying to make it run on my localhost which is provided by the latest version of XAMPP. I have exported and imported the DB with no ...
11
votes
2answers
2k views

Is it better to have an ErrorDocument 404 redirect back to the homepage or a standard 404 error page?

We run an ecommerce site that was setup by a third party ecommerce software provider, basic shop with product pages, basket and checkout. The third party vendor set up the htaccess file so that if a ...