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.
Plz help me config .htaccess file
- angelpeace
- Forum Members
- Posts: 39
- Joined: Fri May 15, 2009 9:45 am
Plz help me config .htaccess file
Last edited by Dr.CSS on Wed Feb 15, 2012 11:53 pm, edited 1 time in total.
Reason: Please use double quotes on fake links so they aren't clickable...
Reason: Please use double quotes on fake links so they aren't clickable...
Re: Plz help me config .htaccess file
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
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
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]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
RewriteRule ^(.+)$ ?key_word=$1 [QSA]
- angelpeace
- Forum Members
- Posts: 39
- Joined: Fri May 15, 2009 9:45 am
Re: Plz help me config .htaccess file
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!
I Try to add after
...
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
RewriteRule ^(.+)$ ?key_word=$1 [QSA]
==> Result Error 500
Help plz. Thanks!
Last edited by Dr.CSS on Thu Feb 23, 2012 3:59 pm, edited 1 time in total.
Reason: Please use double quotes on fake links so they aren't clickable...
Reason: Please use double quotes on fake links so they aren't clickable...
.: No gains without pains :.
Lee's Website: http://www.idev.com.vn;
Lee's Website: http://www.idev.com.vn;