H
H
Hyt2015-07-01 16:39:04
PHP
Hyt, 2015-07-01 16:39:04

How to connect script to .htaccess?

There are 3 files, .htaccess, index.php (main page), scr.php (script, database parser is registered.), how to make the user enter the desired page in the address bar and then the script is included?
On the main page there are a couple of windows for displaying pictures, a field for the names of the pictures and that's it, I would like the window with pictures and the field to change their values ​​when writing the necessary words in the address bar of the browser.
For example, my site is located at www.site.ru, when the user goes to www.site.ru/dom, the window shows a picture of a house, and the value changes to the word house if the user goes to www.site. ru/strana, then pictures of countries and their names were displayed. The path to the pictures and the names are recorded in the database, now how to put it all together? And how to change the parser?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2015-07-01
@hyt

See how the rewrite mod works for Apache. Actually, the same restful api is done by such things

S
Stalker_RED, 2015-07-01
@Stalker_RED

I don't really understand what the parser has to do with it, but your question is very similar to this Executing a script after going through the address bar?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question