Page 1 of 1

Plz help me config .htaccess file

Posted: Wed Feb 15, 2012 7:08 am
by angelpeace
My Website used CMS Package
My .htaccess file:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteCond %{REQUEST_METHOD} !POST$
RewriteRule ^(.*) %{REQUEST_URI}/ [NE,R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

Result OK

"http://www.mydomain.com/search/?key_word=cp10

=> OK

I want to Replace:

?key_word=cp10

To:

"http://www.mydomain.com/search/[b]cp10[/b]/

cp10 is Request string

Thanks.

Re: Plz help me config .htaccess file

Posted: Wed Feb 22, 2012 11:21 am
by manuel
Please look at the "doc" folder. Inside you will find a "CMSMS_config_reference.pdf" and "htaccess.txt".

adding the following line to the default config.php:
$config['url_rewriting'] = 'mod_rewrite';

and uncommenting the relevant lines in your .htaccess (copy the contents from the example "htaccess.txt") should suffice to get pretty URL's working.

Greetings,
Manuel

Re: Plz help me config .htaccess file

Posted: Wed Feb 22, 2012 10:48 pm
by Dr.CSS
I don't know about rewrite rules, I just use the default in doc folder...

RewriteRule ^(.+)$ index.php?page=$1 [QSA]
RewriteRule ^(.+)$ ?key_word=$1 [QSA]

Re: Plz help me config .htaccess file

Posted: Thu Feb 23, 2012 7:06 am
by angelpeace
Sorry, My full address is: "http://www.domain.com/index.php?page=search&key_word=[Request String value]

I Try to add after
...
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
RewriteRule ^(.+)$ ?key_word=$1 [QSA]

==> Result Error 500

Help plz. Thanks!