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). 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. 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 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 . Link to comment https://forums.phpfreaks.com/topic/192865-short-urls/#findComment-1019048 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.