/    Sign up×
Community /Pin to ProfileBookmark

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
[/CODE]

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@rootJul 17.2013 — Is that an exact copy & paste?

</IfModule is missing > off the end.
Copy linkTweet thisAlerts:
@justlukeyouauthorJul 18.2013 — Hi,

Yes the /ifModule is on there. Is there something else I could try?
Copy linkTweet thisAlerts:
@rootJul 20.2013 — I was asking if your </IfModule had the closing > because what you posted is </IfModule
×

Success!

Help @justlukeyou spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...