jkewlo Posted May 23, 2009 Share Posted May 23, 2009 Hey me again (dont run ). Well so I am trying to do a short url rewrite kinda like myspace. yoursite.com/username so I know it has to be .htaccess so I. ErrorDocument 404 /404.php RewriteEngine on Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ /view.php?profile=$1 [L] it is returning a internal server error, when trying to run it, which as we both know will pretty much shut the site down ><, any suggestions on what should be done? Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/ Share on other sites More sharing options...
Ken2k7 Posted May 23, 2009 Share Posted May 23, 2009 Try putting Options line below ErrorDocument. Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840523 Share on other sites More sharing options...
jkewlo Posted May 23, 2009 Author Share Posted May 23, 2009 http://eve-lounge.com/new/Grind3r Im getting my 404 error page, a lot better then the internal server error page >< Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840525 Share on other sites More sharing options...
Ken2k7 Posted May 23, 2009 Share Posted May 23, 2009 Wrong forum... But try this ErrorDocument 404 /404.php Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ view.php?profile=$1 [L] The rewrite rule looks off to me. Which part do you want to get? new or Grind3r? Or both? Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840527 Share on other sites More sharing options...
jkewlo Posted May 23, 2009 Author Share Posted May 23, 2009 Well, new is the folder I am redesigning my site in, and Grind3r is the username. I have the .htaccess file in the new directory When I run it I get the horrid ISE (internal server error) Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840531 Share on other sites More sharing options...
Ken2k7 Posted May 23, 2009 Share Posted May 23, 2009 ErrorDocument 404 /404.php Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z]+)$ view.php?profile=$1 [L] I'm not sure if the / would have caused anything. I would assume not. Try that one. Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840533 Share on other sites More sharing options...
jkewlo Posted May 23, 2009 Author Share Posted May 23, 2009 Still no luck, Is there a forum on here for .htaccess? Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840534 Share on other sites More sharing options...
Ken2k7 Posted May 23, 2009 Share Posted May 23, 2009 It's mod_rewrite. One more try ErrorDocument 404 /404.php Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ([a-zA-Z]+)$ view.php?profile=$1 [L] Is it possible for you to print out what $_GET['profile'] is in view.php? That should help. Unless you're still getting 404s. Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840539 Share on other sites More sharing options...
jkewlo Posted May 23, 2009 Author Share Posted May 23, 2009 Solved, Options +FollowSymlinks isnt allowed on my server. THANKS guys >< Link to comment https://forums.phpfreaks.com/topic/159361-solved-htaccess-for-url-rewrite/#findComment-840551 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.