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

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. 

Share this post


Link to post
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. 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

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.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Loading...
Sign in to follow this  

×
×
  • Create New...