www.webdeveloper.com
Results 1 to 4 of 4

Thread: Damaged htaccess File With Slug In Link

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    11

    Damaged htaccess File With Slug In Link

    Hi,

    I have caused a major problem with my site. I have tried to add a slug to the link.

    So instead of..

    .com/product/12345

    I now have...

    .com/product/12345/large-red-widget.

    However the changes I have made to my htaccess file have now affected all the other links on my site which run from a query. Can anyone advise how to amend the htacess file just so it impacts on products.

    Code:
        
    Options -Indexes
        Options -MultiViews
        Options +FollowSymLinks
    
        # Prevent viewing of htaccess file
        <Files ~ "^\.ht">
        order allow,deny
        deny from all
        satisfy all
        </Files>
    
        # Disable directory listing from this point
        Options -Indexes
    
        # Error Pages
        ErrorDocument 404 /404-error.php
    
        # Rewrite Rules
        <IfModule mod_rewrite.c>
        RewriteEngine on
          RewriteCond %{REQUEST_FILENAME} !-f
          RewriteCond %{REQUEST_FILENAME} !-d
          RewriteRule ^products/product/([0-9]+)/(.*)$ products/product.php?product_id=$1 [QSA,L]
          RewriteRule ^articles/article/([0-9]+)/(.*)$ articles/article.php?ID=$1 [QSA,L]
            RewriteRule ^articles/articlesfiltered/([A-Za-z]+)/(.*)$ articles/articlesfiltered.php?articlecategory=$1 [QSA,L]
          RewriteRule ^plusstyle/plusstyle/([0-9]+)/(.*)$ plusstyle/plusstyle.php?ID=$1 [QSA,L]
           RewriteRule ^plusstyle/plusstylesfiltered/([A-Za-z]+)/(.*)$ plusstyle/plusstylesfiltered.php?articlecategory=$1 [QSA,L]
             RewriteRule ^([a-z]+)/([a-z\-]+)$ /$1/$2.php [QSA,L]
        </IfModule

  2. #2
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,036
    Is that an exact copy & paste?

    </IfModule is missing > off the end.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

  3. #3
    Join Date
    Feb 2007
    Posts
    11
    Hi,

    Yes the /ifModule is on there. Is there something else I could try?

  4. #4
    Join Date
    Mar 2007
    Location
    localhost
    Posts
    2,036
    I was asking if your </IfModule had the closing > because what you posted is </IfModule
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles