Page 1 of 1

About 301

Posted: Wed Oct 18, 2017 4:11 pm
by rooon
Hello, I'm trying to get the 301 working in htaccess.

CMSMS has been setup in Xampp in folder /abc/cmsvoeten
- cmsms 2.2.3.1
- CGExtensions 1.56.2
- CMSMailer 6.2.14
- FormBuilder 0.8.1.6

In /abc/cmsvoeten/config.php I added

Code: Select all

$config['url_rewriting'] = 'mod_rewrite';
In /abc/cmsvoeten/.htaccess I have only these lines for testing

Code: Select all

RewriteBase /abc/cmsvoeten
RewriteEngine on
RedirectMatch 301 /abc/cmsvoeten/dir/page(.*)  http://www.lan.home/abc/cmsvoeten/welcome/us
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Page /abc/cmsvoeten/dir/page does not exist so there is a 301 redirect to page /abc/cmsvoeten/welcome/us.

For some reason I get a 404 and the new browser url after the redirect is
/abc/cmsvoeten/welcome/us/?page=dir/page

Someone has a hint or solution for this bahavior?

Thanks, Ronald

Re: About 301

Posted: Wed Oct 18, 2017 5:05 pm
by Rolf

Re: About 301

Posted: Wed Oct 18, 2017 9:08 pm
by rooon
Thanx. It works, this did the job.

Code: Select all

RewriteRule ^producten/informatie$ http://www.lan.home/abc/cmsvoeten/categorie/overzicht [R=301,L]
For some reason /abc/cmsvoeten/dir/page still gives the 404 as mentioned above but all other non-existing urls are redirected as expected.