переписать URL в адресной строке без изменения фактического URL


0
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

Ответы:


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]

не работает, если index.php удален, я даже не могу войти, можно ли перенаправить только index.php (не переписывать) в root
The KingMaker
Используя наш сайт, вы подтверждаете, что прочитали и поняли нашу Политику в отношении файлов cookie и Политику конфиденциальности.
Licensed under cc by-sa 3.0 with attribution required.