Jump to content
Larry Ullman's Book Forums

Site #2 - Htaccess Issues


Recommended Posts

Hey Everybody, First post on the "new forums"

 

I am working on implementing the e-commerce site #2 and have come across issues with the .htaccess

 

Here are a few examples of the issues i am running into

 

/shop/batik/ seems to work, but without any images or css...

http://paintedbatiks.com/shop.php?type=batik

http://paintedbatiks.com/shop/batik/

 

/browse/batik/Category1/1 does not work at all....

http://paintedbatiks.com/browse.php?type=batik&category=1&id=1

http://paintedbatiks.com/browse/batik/Category1/1

 

Here is my phpinfo

phpinfo()

 

 

Here is my .htaccess

<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]
</IfModule>

 

Any advice would be helpful

Thanks,

Greg

Link to comment
Share on other sites

htaccess files need to be off of the web root or web accessible folder.

 

 

To be clear, .htacess files MUST be within the Web directory.

 

If the original poster is still having problems with this, please check out some of the other threads on the topic and see if that helps. If not, return here. And please post the actual details of your server.

 

 

Link to comment
Share on other sites

Hey,

 

I have been reading the other posts on the forum, and came across one that suggested adding Options -MultiViews to the .htaccess, but didnt have any luck.

 

 

Alright i currently have.htaccess uploaded to the /home/paintedb/ and /home/paintedb/public_html/ directories.

 

 

php info

 

 

server settings

Apache version 2.2.17

PHP version 5.2.16

MySQL version 5.1.52

Architecture i686

Operating system linux

 

Thanks,

Greg

Link to comment
Share on other sites

Okay. If you're having problems with images and CSS not showing up, then you need to change your references to those resources so they are absolute and correct. If you're having problems with other pages not working, debugging really depends upon what, exact, problem you're having. "Does not work at all" isn't informative.

 

Also, I appreciate that you're trying to provide information by linking to pages on your site, but that does require people to take extra steps in order to assist. How about putting your information here, and then also linking to the relevant pages?

Link to comment
Share on other sites

Ugh, I figured out my entire problem.... I manually edited the category names in sql and named them all "Category 1" "Category 2" and "Category 3"... The reason the /browse/ was due to the htaccess file only allowing a-zA-Z and not #'s...

 

Dumb mistake..

 

Thanks for the assistance and advice.

 

Greg

Link to comment
Share on other sites

 Share

×
×
  • Create New...