dmx1 Posted September 3, 2017 Share Posted September 3, 2017 Hi, I am a newbie, so please excuse any simple errors I may be making. The address for my php site is: http://localhost:8888/headbands1/ All my files are in the 'headbands1' root directory, such as the 'include', 'views', 'shop', 'sales', index.php. I have a file called '_.htaccess.txt' also in the 'headbands1' directory. I don't know if I really need to include the '_.htaccess.txt' file or not. It has the following information in it: <IfModule mod_rewrite.c>RewriteEngine on# For sales:RewriteRule ^./shop/sales/?$ sales.php# For the primary categories:RewriteRule ^./shop/([A-Za-z\+]+)/?$ shop.php?type=$1# For specific products:RewriteRule ^./browse/([A-Za-z\+\-]+)/([A-Za-z\+\-]+)/([0-9]+)$ browse.php?type=$1&category=$2&id=$3# For HTTPS pages:RewriteCond %{HTTPS} offRewriteRule ^./(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]</IfModule> When I click on an image, on the home page, I get an error saying: 'The requested URL /shop/sales/ was not found on this server.' The shop.php and sales.php pages have not been edited in any way. Can you tell me what I can do, so when I click on the 'Sales Item' image, on the home page, I will not get the above error, and it will take me to the correct page. Thanks Link to comment Share on other sites More sharing options...
Larry Posted September 14, 2017 Share Posted September 14, 2017 Welcome! You do need to use .htaccess and mod_rewrite in order for those URLs to work. However it must be exactly named .htaccess, no underscore, no .txt extension. Link to comment Share on other sites More sharing options...
Recommended Posts