Im facing SEO problem with my website cause my urls are with index.php
for an example when i try to upload a file the url is like this

1 - http://niresh12495.com/index.php?app=downloads

and when i try to upload an image the url is this on the address bar

2 - http://niresh12495.com/index.php?app=upload

is it possible to fake url in the address bar the real address should be hidden
i need the urls as follow

например 1 - http://niresh12495.com/app/downloads
например 2 - http://niresh12495.com/app/upload

There is also another problem that http://niresh12495.com/index.php is not redirected to 
http://niresh12495.com/   
i tried to hide index.php but in some case there is a trailing question mark after url

Once i fixed the url completely but the problem was when i tried to post a topic
the url was redirected to niresh12495.com/index.php? then to the home page niresh12495.com
it looks like arguments are passing through index.php? I'm not completely assure of the   
problem

1 ответ1

0

Попробуйте этот код:

# remove index.php
RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^(.*?)index\.php$ /$1 [L,R=302,NC,NE]

RewriteCond %{THE_REQUEST} \s/+search\.php\?app=([^\s&]+) [NC]
RewriteRule ^ /app/%1? [R=302,L]

RewriteRule ^app/([^/.]+)/?$ /index.php?app=$1 [L,QSA,NC]

Всё ещё ищете ответ? Посмотрите другие вопросы с метками .