what is wrong with this?

Discuss practical ways rearrange URLs using mod_rewrite.

what is wrong with this?

Postby celebritywallpaper.us » Sun Sep 07, 2008 7:51 pm

i got 500 internal error and my host said its my htacess

Code: Select all
Options -MultiViews
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^$ /index.php [L]
RewriteCond $1 !^(index\.php|install|img|smarty|images|scripts|fonts|uploads|css|js|robots\.txt|sitemap\.xml|favicon\.ico)
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule (.*)-(.*)\.html$ wallpapers/show/$2
RewriteRule (.*)-(.*)/$ categories/show/$2
RewriteRule (.*)-(.*)\/(.*)$ categories/show/$2/$3


Thanks advance
celebritywallpaper.us
 
Posts: 41
Joined: Sat Feb 03, 2007 6:27 am

Postby richardk » Mon Sep 08, 2008 11:49 am

The $1 in the RewriteCond might be the problem. Try
Code: Select all
Options +FollowSymLinks -MultiViews

RewriteEngine On

RewriteRule ^$ /index.php [L]

RewriteCond %{REQUEST_URI} !^(index\.php|install|img|smarty|images|scripts|fonts|uploads|css|js|robots\.txt|sitemap\.xml|favicon\.ico)(/.*)?$ [NC]
RewriteRule ^(.+)$ /index.php/$1 [QSA,L]

RewriteRule ^.+-(.+)(\.html|/)$ /wallpapers/show/$1    [QSA,L]
RewriteRule ^.+-(.+)/(.+)$      /categories/show/$1/$2 [QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 6 guests

cron