php - How do i setup htaccess to allow changes to occur? -
below rewrite rule:
rewriteengine on rewriterule ^search/$ search/searchpage.php [l,nc] the .htacess file located @ root of website
problem not take me searchpage.php when type domain.com/search/, takes me 403 error page (note there no index.php page here).
this uploaded in amazon elastic beanstalk
you thinking of backwards, need call full url , rewrite real one.
like this,
rewriterule ^search/category/(.+)/ domain.com/search/searchpage.php?crs_category=$1 [l] and use url http://domain.com/search/category/business/ , rewrite ( not redirect ) mapped. url in browser stay same.
i not sure 100% of .htaccess off top of head method use.
make sense?
the (.+) bit capture group , capture category , $1 output first capture group. further reading how use regular expressions.
as mentioned router in comments, issue method have map each 1 hand, ok 1 or 2 can real ugly real fast.
Comments
Post a Comment