Jump to content
Larry Ullman's Book Forums

Site 2 Linking Problems


Recommended Posts

Ok so at first I couldn't get the index.php page to show up but after adding the mod

-rewrite, then after adding the subdirectory to the css link, img src and href everything displayed fine and almost every link works. The only links that are not working are the ones that go to coffee, goodies, and sales, along with all the links that are a product.

in my htdocs folder i have site2/index.php so I was putting site2 in front of references like the book mentioned but those pages wont load. the links are like this /site2/shop/goodies and the last one changes depending on link. I hope you guys understand my problem. Any insights on how to get  these links working would be stupendous. 

Link to comment
Share on other sites

So the problem seems to be in your mod_rewrite, the rules for which are in your .htaccess file. You should be using a RewriteBase in those rules with a value of /site2/ (not sure about the slashes). If you can't get this to work playing around with it, please post the contents of your .htaccess. 

Link to comment
Share on other sites

  • 2 weeks later...

Hi Larry,

I have a similar problem as Cclear wrote. My problem though starts with the sales link and I have checked my .htaccess file which is correct(or so it seems). The link to Sales just don't want to link up for some reason. I have tried to simplify the linking files only to include a header and that doesn't work either. So I am stuck with that the problem lies within the .htaccess file, but why would browse and shop work fine and not sales.

Link to comment
Share on other sites

Hi Larry

 

I have found an error in the .htaccess file of /ex2/html in the 2nd ecommerce site. There is a added slash in  the code.

 

RewriteRule ^shop/sales/?$ /sales.php

 

Correct me if I'm wrong, so the extra slash is added in the URL and obviously the file then does not exist. Removing the slash in the code resolved the issue.

Link to comment
Share on other sites

 Share

×
×
  • Create New...