G
G
gipsonsuro2018-08-06 00:46:11
htaccess
gipsonsuro, 2018-08-06 00:46:11

How to remove index.php?id= from url?

I am promoting a SEO site, I ran into such a problem:
I use Get Simple CMS! If you follow the link "website / any symbols", you are redirected to page 404 (page not found), everything is as it should be, but if you follow the link "website / page from the site / any symbol", the page itself will open, that is, there is no redirect to the 404 page.
I tried ErrorDocument 404 /404.php in .htaccess, it doesn't help! If you remove %slug% from the CMS Settings line in the CMS Settings, then everything works, but then the link changes, /index.php?id= is added.
I tried to insert this rule:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_URI} ^(.*)/index\.php$
RewriteRule ^(.*)$ %1/ [R=301,L]
As a result, index.php disappears, ?id= remains, tried a bunch of options, but could not win!
Help solve the problem!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2018-08-06
@shambler81

RewriteCond %{REQUEST_METHOD} =GET
RewriteCond %{REQUEST_URI} ^(.*)/index\.php$
RewriteRule ^(.*)$ %1/? [R=301,L]

G
gipsonsuro, 2018-08-07
@gipsonsuro

Did not help, all pages open with a link to the main page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question