limitphp Posted March 30, 2009 Share Posted March 30, 2009 I believe this rewrite rule is giving me a 500 internal error on my website at lunarpages: RewriteRule ^playlist/([a-zA-Z0-9-]+)/([a-zA-Z0-9-_]+)/?$ playlist.php?p_username=$1&nameHash=$2 [NC,L] It looks ok to me, am I missing something? Link to comment https://forums.phpfreaks.com/topic/151754-solved-rewrite-rule-giving-me-500-internal-error-on-lunarpages/ Share on other sites More sharing options...
corbin Posted March 30, 2009 Share Posted March 30, 2009 What does the Apache error log say? Link to comment https://forums.phpfreaks.com/topic/151754-solved-rewrite-rule-giving-me-500-internal-error-on-lunarpages/#findComment-797176 Share on other sites More sharing options...
limitphp Posted April 1, 2009 Author Share Posted April 1, 2009 What does the Apache error log say? [Tue Mar 31 13:26:11 2009] [alert] [client 66.249.71.71] /home/greckle0/public_html/.htaccess: RewriteRule: cannot compile regular expression '^playlist/([a-zA-Z0-9-]+)/([a-zA-Z0-9-_]+)/?$'\n here is the entire htaccess file: suPHP_ConfigPath /home/greckle0/public_html/ RewriteEngine on RewriteRule ^page([a-zA-Z0-9]*)/?$ index.php?currentpage=$1 [NC,L] RewriteRule ^artist/([a-zA-Z0-9-]+)/?$ artist.php?artistNameHash=$1 [NC,L] RewriteRule ^comments/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ comment.php?artistNameHash=$1&songNameHash=$2 [NC,L] RewriteRule ^searchPlaylists/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/?$ searchPlaylists.php?artistNameHash=$1&songNameHash=$2 [NC,L] #RewriteRule ^playlist/([a-zA-Z0-9-]+)/([a-zA-Z0-9-_]+)/?$ playlist.php?p_username=$1&nameHash=$2 [NC,L] RewriteRule ^user/([a-zA-Z0-9-]+)/?$ user.php?u_username=$1 [NC,L] I actually commented that line out, so I don't know how its giving it an error. Plus, it worked on my test server (wamp server). I added that first line with the suphp because the lunarpage support staff said I had to because they use suPHP.... Link to comment https://forums.phpfreaks.com/topic/151754-solved-rewrite-rule-giving-me-500-internal-error-on-lunarpages/#findComment-798300 Share on other sites More sharing options...
limitphp Posted April 6, 2009 Author Share Posted April 6, 2009 solved: #RewriteRule ^playlist/([a-zA-Z0-9-]+)/([a-zA-Z0-9_-]+)/?$ playlist.php?p_username=$1&nameHash=$2 [NC,L] the underscore could not be last....I had to make the dash last.... who knew? Link to comment https://forums.phpfreaks.com/topic/151754-solved-rewrite-rule-giving-me-500-internal-error-on-lunarpages/#findComment-802485 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.