0

on query:

domain.com/page/do

i need:

domain.com/index.php/page/do

etc.

i use htaccess file, i add alias

RewriteBase /index.php/

How i write RewriteRule to this url?

John Mex
  • 3
  • 2

3 Answers3

1

Try this, it should do what you want, and eliminate the need to have index.php in your uri

###
# Rewrite Rules
#

<IfModule mod_rewrite.c>

    ### Enable mod_rewrite

    RewriteEngine On
    RewriteBase /

    ### Checks if the URI request path coincides with a literal path
    ### on the filesystem relative to the webroot. If it does not exist,
    ### then it passes the path through index.php.

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>
mladoux
  • 11
  • 2
0

Try this:

RewriteRule ^(.*)/(.*)$  /$1/$2 [L]
Develoger
  • 3,950
  • 2
  • 24
  • 38
0

Add these rules to the htaccess file in your document root:

RewriteEngine On
RewriteBase /
RewriteCond ^/index.php
RewriteRule ^/?(.*)$ /index.php/$1 [L]
Jon Lin
  • 142,182
  • 29
  • 220
  • 220