The Little Guy Posted February 21, 2010 Share Posted February 21, 2010 I am having a hard time getting this to work: Options +FollowSymlinks RewriteEngine on RewriteRule ^/(.*) process/urlgo.php?url=$1 [nc] I want the person to be able to type in: http://mysite.com/value and it does: http://mysite.com/process/urlgo.php?url=value When I do that, all I get is "Oops! This link appears to be broken." in Google Chrome (HTTP 404). Quote Link to comment https://forums.phpfreaks.com/topic/192865-short-urls/ Share on other sites More sharing options...
cags Posted February 22, 2010 Share Posted February 22, 2010 You don't need the forward slash at the start of the RewriteRule, but you probably do at the start of the redirected address. Quote Link to comment https://forums.phpfreaks.com/topic/192865-short-urls/#findComment-1016041 Share on other sites More sharing options...
The Little Guy Posted February 27, 2010 Author Share Posted February 27, 2010 This works: Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+) urlgo.php?url=$1 Quote Link to comment https://forums.phpfreaks.com/topic/192865-short-urls/#findComment-1019030 Share on other sites More sharing options...
cags Posted February 27, 2010 Share Posted February 27, 2010 Same difference, RewriteBase simply appends to the start of the rewrite address . Quote Link to comment https://forums.phpfreaks.com/topic/192865-short-urls/#findComment-1019048 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.