About 301

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
rooon
Forum Members
Forum Members
Posts: 113
Joined: Mon Dec 05, 2011 4:40 pm
Location: Nederland

About 301

Post 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
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: About 301

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
rooon
Forum Members
Forum Members
Posts: 113
Joined: Mon Dec 05, 2011 4:40 pm
Location: Nederland

Re: About 301

Post 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.
Locked

Return to “[locked] Installation, Setup and Upgrade”