N
N
Nikita Emanov2017-04-24 10:44:47
PHP
Nikita Emanov, 2017-04-24 10:44:47

Creating a CNC URL with htaccess?

There is a form on the site, when choosing a city, information for the selected city is displayed.
Select the city MoscowSt. Petersburg
When choosing Moscow, the url is site.ru/index.php?city=moscow
In htaccess I created a
RewriteEngine On
RewriteRule ^([^/]*)\.html$ /index.php?city=$1 [ L]
Now the site works on the url site.ru/moscow.html
But if you manually enter it, tell me how to make it so that when choosing a city, the url is immediately displayed.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel, 2017-04-24
@PavelMonro

Edit php script or make redirects in the same file

V
Viktor Taran, 2017-04-24
@shambler81

where is the screen?

RewriteRule ^([^/]*)\.html$ /index.php\?city=$1 [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question