I have this peace of code:
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^([^/]+)-([0-9]+)$ /index.php?action=$1&no=$2 [QSA,L]
RewriteRule ^([^/]+)-([0-9]+)/$ /index.php?action=$1&no=$2 [QSA,L]
RewriteRule ^([^/]+)-([0-9]+)-$ /index.php?action=$1&no=$2 [QSA,L]
RewriteRule ^([^/]+)-([0-9]+)-([^/]+)$ /index.php?action=$1&no=$2 [QSA,L]
RewriteRule ^([^/]+)-([0-9]+)-([^/]+)/$ /index.php?action=$1&no=$2 [QSA,L]
ErrorDocument 404 "http://www.example.com/404.php"
And now.. I wanted to sort not to be redirected into page 404.php. So all scenarios are ok but theres problem with those ones:
- Code: Select all
http://www.example.com/detail
- Code: Select all
http://www.example.com/detail/
- Code: Select all
http://www.example.com/detail-
I tryed to add those lines
- Code: Select all
#RewriteRule ^([^/]+)$ /index.php?action=$1 [QSA,L]
#RewriteRule ^([^/]+)/$ /index.php?action=$1 [QSA,L]
#RewriteRule ^([^/]+)-$ /index.php?action=$1 [QSA,L]
but server says error 500.
Thank you for helping. Or i just need "to show the door".