Jump to content
Larry Ullman's Book Forums
Sign in to follow this  

Links Wll Not Work

Recommended Posts



I am a newbie, so please excuse any simple errors I may be making.


The address for my php site is:




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} off
RewriteRule ^./(checkout\.php|billing\.php|final\.php|admin/(.*))$ https://%{HTTP_HOST}/$1 [R=301,L]





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

Share this post

Link to post
Share on other sites

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. 

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...