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

Htaccess Version 2 In Ex2 Dont Work?

Recommended Posts

 

Hello,

I bought the new book version 2.0.

I am now using the ex2 software testing.

But the menus do not appear via htaccess.

My htaccess is:

<IfModule mod_rewrite.c>

Options-MultiViews

RewriteEngine on

# For the primary categories:

RewriteRule ^ shop / (coffee | goodies)? / Shop.php $ type = $ 1?

 

# For sales:

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

# For specific products:

RewriteRule ^ browse / (coffee | goodies) / ([A-Za-z \ + \ -] +) / ([0-9] +) / $ browse.php type = $ 1 & category = $ 2 & id = $ 3?

[edit]

Yes Fixed.

I have to change the menu in header html in

shopon/shop/sales and it works

[/edit]

# For HTTPS pages:

RewriteCond% {HTTPS} off

RewriteRule ^ (\ checkout php |. Billing \ php |. Final \ php |. Admin / (*).) $ Https://% {HTTP_HOST} / $ 1 [R = 301, L]

 

</ IfModule>

Even with my ISP does not work.

I work at home with xampp in localhost and the ISP in a sub folder test.

Folder in localhost htdocs / shopon

Anyone have an idea?

Thanks and regards.

Edited by Descartes

Share this post


Link to post
Share on other sites

Hello and welcome to the forums.

 

mod_rewrite is a tricky thing that causes a lot of people problems.

For testing purposes, start of with something very simple (e.g., RewriteRule a.html b.html), and make sure that works.

If it does, then you know the problem is with your regexes.

If it doesn't, then you know the problem is with your setup/configuration.

Share this post


Link to post
Share on other sites

Hello,

I bought the new book version 2.0.

I am now using the ex2 software testing.

But the menus do not appear via htaccess.

My htaccess is:

<IfModule mod_rewrite.c>

Options-MultiViews

RewriteEngine on

# For the primary categories:

RewriteRule ^ shop / (coffee | goodies)? / Shop.php $ type = $ 1?

 

# For sales:

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

# For specific products:

RewriteRule ^ browse / (coffee | goodies) / ([A-Za-z \ + \ -] +) / ([0-9] +) / $ browse.php type = $ 1 & category = $ 2 & id = $ 3?

[edit]

Yes Fixed.

I have to change the menu in header html in

shopon/shop/sales and it works

[/edit]

# For HTTPS pages:

RewriteCond% {HTTPS} off

RewriteRule ^ (\ checkout php |. Billing \ php |. Final \ php |. Admin / (*).) $ Https://% {HTTP_HOST} / $ 1 [R = 301, L]

 

</ IfModule>

Even with my ISP does not work.

I work at home with xampp in localhost and the ISP in a sub folder test.

Folder in localhost htdocs / shopon

Anyone have an idea?

Thanks and regards.

I'm running XAMPP on my pc and I foundout that the httpd.conf for Apache needs to be edited and have "AllowOverride none" changed to "AllowOverride All" for the mod_rewrite to work. Then test to see if your .htaccess is working. To do that add something like RewriteRule ^test.php index.php in the .htaccess file.

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.

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