1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Help needed regarding opencart htaccess issue index.php?_route_=

Discussion in 'PHP' started by ahheng, Mar 27, 2015.

  1. #1
    Wonder does anyone know how to fix this?

    example i want it to be
    http://www.test.com/testing
    instead of
    http://www.test.com/index.php?_route_=testing

    Below is my rewrite rule, i not sure is it correct. hope someone can guide me

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
    RewriteCond %{QUERY_STRING} ^route=common$/
    RewriteCond %{REQUEST_METHOD} !^POST$
    RewriteRule ^index\.php$ http: //%{HTTP_HOST}? [R=301,L]
    RewriteCond %{HTTP_HOST} ^test.com
    RewriteRule (.*) http://www.test.com/$1 [R=301,L]
     
    ahheng, Mar 27, 2015 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?_route_=$1&%{QUERY_STRING} [L,QSA]
     
    EricBruggema, Mar 28, 2015 IP