WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 08.12.2016 21:17:23

foxlake
Mitglied

htaccess quistion

Need help with htaccess: 
This is what i get on a website now:

RewriteEngine On
# If called directly - redirect to short url version
RewriteCond %{REQUEST_URI} !/pages/intro.php
RewriteCond %{REQUEST_URI} /pages
RewriteRule ^pages/(.*).php$ /$1/ [R=301,L]

# Send the request to the short.php for processing
RewriteCond %{REQUEST_URI} !^/(pages|admin|framework|include|languages|media|account|search|temp|templates/.*)$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([\/\sa-zA-Z0-9._-]+)$ /short.php?_wb=$1 [QSA,L]
   
RewriteEngine On
RewriteRule ^sitemap.xml$ /google_sitemap.php [L]

What do I want to change ?
I installed the module 404, and I want error pages to go to a 404 page.  (Now the go to the index)
I want a 301 http://www.mywebsite.nl   most go to  https://mywebsite.nl
                   http://mywebsite.nl  most go to https://mywebsite.nl
                   https://www.mywebsite.nl most go to https://mywebsite.nl

Why?  I'm  looking at Google ranking and when there is a 301,  and a 404 you're website is better in 'rules' to get a step higher.
What wood be the new htacces ?    Thank you in advance.

Offline

#2 08.12.2016 23:52:07

florian
Administrator

Re: htaccess quistion

For https redirect, see http://stackoverflow.com/questions/1397 … -https-www

For 404 redirect, you have to edit the short.php. Seearch for

//Change this to point to your existing 404 page.
define('ERROR_PAGE', '/'); 

and put there the short name of your 404 page, i.e.

define('ERROR_PAGE' , '/my404page'); 

Offline

#3 10.12.2016 12:04:47

foxlake
Mitglied

Re: htaccess quistion

Thank you Florian,

I changed the short.php  and now pages that are not there go to  404,  but it don't stays there, it will go to the index immediately.

Can it als stop and stays on the 404 ?  Is there another script I should change ?

Offline

#4 10.12.2016 12:33:10

florian
Administrator

Re: htaccess quistion

Please check if the page you defined as 404 page really exists.

Offline

#5 11.12.2016 09:29:04

foxlake
Mitglied

Re: htaccess quistion

Yes it is,  and its going to this page, but it jumps then automatic to the index.

Thank you

Offline

#6 11.12.2016 09:39:26

florian
Administrator

Re: htaccess quistion

Strange. Currently I do not have any idea how this could happen.
Can you send me a link per PM so I could have a look at it?

Offline

#7 11.12.2016 09:50:51

foxlake
Mitglied

Re: htaccess quistion

Sorry,  Now I think that de module MOD404PLUS  is build to work that way.  It only counts the 404's and redirect than to the home page.
In my case its not bad to let it stay on the 404 page. 
I will take a look in the PHP files of the module  MOD404PLUS and see of I can find something there.

Offline

#8 11.12.2016 09:55:26

florian
Administrator

Re: htaccess quistion

I see.

Offline

Fußzeile des Forums

up