Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-11-02 12:56:39

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

disable 404?

Is there any way to disable the textpattern generated 404 for a site so that it just uses the one dictated by the toplevel .htaccess? My textpattern is a directory below and I already have one…

Thank you!!

Offline

#2 2014-11-02 15:30:51

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,355
GitHub

Re: disable 404?

Yes – copy and paste your 404 directives from the parent .htaccess to the Textpattern .htaccess.

Offline

#3 2014-11-02 15:43:45

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: disable 404?

Tried that, but not working for me, hence I asked =(. Set under both the /textpattern/ subdirectory and the one above, [url deleted jji] still shows the textpattern stuff

Last edited by ingleslenobel (2014-11-02 20:12:38)

Offline

#4 2014-11-02 15:47:40

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,355
GitHub

Re: disable 404?

Can you post your site diagnostics? Admin -> Diagnostics. There’s a section for .htaccess contents that I’m interested in.

Offline

#5 2014-11-02 15:54:22

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: disable 404?

Some Textpattern files have been modified: 
 /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/extremist/textpattern/publish/atom.php, 
 /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/extremist/textpattern/publish/rss.php ?

The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: set_time_limit ?@@


Textpattern version: 4.5.7 (r5900)
Last update: 2014-10-16 12:40:49/2014-10-16 12:39:11
Document root: /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs
$path_to_site: /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/extremist
Textpattern path: /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/extremist/textpattern
Permanent link mode: title_only
Temporary directory path: /home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/extremist/textpattern/tmp
Site URL: extreme-macro.co.uk/extremist
PHP version: 5.4.34
GD Graphics Library: bundled (2.1.0 compatible); supported formats: GIF, JPG, PNG.
Server TZ: UTC
Server local time: 2014-11-02 15:50:38
DST enabled?: 0
Automatically adjust DST setting?: 1
Time zone: Europe/London (0)
MySQL: 5.1.73-log
Locale: en_GB.UTF-8
Server: Apache
PHP server API: cgi-fcgi
RFC 2616 headers: 0
Server OS: Linux 2.6.32-431.11.2.el6.x86_64
Active plugins: sab_substr-0.4, rvm_substr-0.3, rah_function-0.7.1, ob1_title-4.1, adi_gps-0.1, smd_if-0.91, aks_header-0.3.6, smd_each-0.2, mkp_url_parameters-1.1, rah_replace-0.4.2, smd_macro-0.30, smd_where_used-0.30, glz_custom_fields-1.4.0-beta
Admin-side theme: hive 4.5.7

Pre-flight check: 
------------------------
Some Textpattern files have been modified: 
	/home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/extremist/textpattern/publish/atom.php, 
	/home/plat-linnas01/e/extreme-macro.co.uk/user/htdocs/extremist/textpattern/publish/rss.php
The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: set_time_limit
------------------------

<code>.htaccess</code> file contents: 
------------------------
#DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default

<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php

	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

# SVG
AddType image/svg+xml  svg svgz
AddEncoding gzip       svgz


ErrorDocument 400 /400.php 
ErrorDocument 401 /401.php 
ErrorDocument 403 /sorrycharlie/403.php
ErrorDocument 404 /404.php 
ErrorDocument 410 /410.php 


------------------------

omg this textile markup driving me nuts

Edited for Textile markup before inglesnobel loses his mind -gaekwad

Last edited by gaekwad (2014-11-02 15:55:49)

Offline

#6 2014-11-02 15:59:03

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,355
GitHub

Re: disable 404?

Untested, but try this:

ErrorDocument 404 ../404.php

For completeness, if you make a 404.php in your subdirectory (same level as the Textpattern index.php) does that load on a 404?

Offline

#7 2014-11-02 16:04:05

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,915
Website GitHub

Re: disable 404?

Trying placing the ErrorDocument directives you have at the bottom at the top of the htaccess file where you can see the other ErrorDocument placeholder (the placeholder has a hash in front of it, your directives shouldn’t). It should then get processed before textpattern gets to it.

I think you’ve specified them correctly with a / in front but if you still don’t have any success, try with the whole url, e.g.

ErrorDocument 404 http://extreme-macro.co.uk/404.php

TXP Builders – finely-crafted code, design and txp

Offline

#8 2014-11-02 16:11:00

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: disable 404?

Hmmmm, none of them worked, [url deleted jji]

Maybe I need to talk to my hosting, they have a ’404 for newbies’ backend widget and maybe that’s interfering (although I have it off!)

I don’t get why it’s showing me the content of ‘links’ though

Thanks again!!

Last edited by ingleslenobel (2014-11-02 20:13:00)

Offline

#9 2014-11-02 17:31:48

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,915
Website GitHub

Re: disable 404?

And you’ve definitely moved the ErrorDocument directives to the top of the htaccess file (the one in your /extremist subfolder) so that it is above the textpattern stuff?


TXP Builders – finely-crafted code, design and txp

Offline

#10 2014-11-02 17:34:30

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,355
GitHub

Re: disable 404?

jakob wrote #285389:

Trying placing the ErrorDocument directives you have at the bottom at the top of the htaccess file where you can see the other ErrorDocument placeholder […].

I just tried this here – it works. Ignore my ../404.php suggestion, ingleslenobel.

Offline

#11 2014-11-02 17:47:25

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: disable 404?

Works now with 'ErrorDocument 404 /404.php' in /textpattern/ .htaccess

Thank you all very very much!!!

Last edited by ingleslenobel (2014-11-02 17:48:24)

Offline

#12 2014-11-02 17:49:19

ingleslenobel
Member
Registered: 2014-10-16
Posts: 88

Re: disable 404?

deleted it, it makes all the links everywhere else go wrong

Offline

Board footer

Powered by FluxBB