redsmurph Posted February 14, 2008 Share Posted February 14, 2008 For my service I need to redirect "site/name" to "site/index.php?namearg=name" I've tried ErrorDocument 404 in .htaccess, but when the error script is called SERVER_URI is replaced with the name of the error script rather than retains the original URL/path, so there's no way of telling what "name" is. As many services do the above somehow, there must be a simple solution. I've also tried using the following #Options +FollowSymlinks #RewriteEngine on #RewriteRule ^(.+) index.php?blog=$1 [nc] but then also index.php is replaced (recursively?). How can I tell it to exclude certain scripts and pages? Any advice would be very much appreciated, as the service simply won't be user-friendly without it. Many thanks in advance Link to comment https://forums.phpfreaks.com/topic/91046-redirecting-virtualnon-existing-folder-accesses-to-a-script/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.