How can I show a page that not exists with PHP? -
i have website show information shop online. need following:
when type example.com/shop/name-shop, should show name-shop page.
i'd have file example.com/shop.php show information of shop based on url. don't use example.com/shop?name-shop.
is possible or need create 1 file each shop? tried error page , header location , works fine in url show example.com/shop instead of example.com/shop/name-shop.
thanks.
edit: i'm using .htaccess in apache errordocument 404 /error404.php in file error404.php i've if check if url http://example.com/shop/* when url contains /shop/ redirect header ("location: website") correct shop , works. in url in browser show example.com/shop instead example.com/shop/name-shop. because i'm redirecting shop.php
depending on web server using, need use rewriting rules (mod_rewrite apache) or 404 pages show custom content on each url using 1 php file.
Comments
Post a Comment