acctman Posted July 28, 2008 Share Posted July 28, 2008 my urls read out as http://www.domain.com/view/USER.html i'd like to change the to http://www.domain.com/USER my current .htaccess looks like this. DirectoryIndex index.php Options -Indexes Options +FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^ads/ RewriteCond %{REQUEST_URI} !^shop/ RewriteCond %{REQUEST_URI} !^mp3/ RewriteCond %{REQUEST_URI} !^swf/ RewriteCond %{REQUEST_URI} !^js/ RewriteRule ^(.*) index.php [L] </IfModule> php_flag register_globals on Quote Link to comment Share on other sites More sharing options...
corbin Posted July 29, 2008 Share Posted July 29, 2008 Register globals? Eww! Anyway: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(<regexp for user names here>)/?$ Quote Link to comment Share on other sites More sharing options...
acctman Posted July 29, 2008 Author Share Posted July 29, 2008 Register globals? Eww! Anyway: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/(<regexp for user names here>)/?$ RewriteRule ^/(<regexp for user names here>)/?$ what would that be? Quote Link to comment Share on other sites More sharing options...
corbin Posted July 30, 2008 Share Posted July 30, 2008 It would be what ever format your user names can possibly be. Probably the loosest thing you will want to use is: (OMG I just realized I only put half of it x.x.) RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/([^/]+)/?$ /view/$1.html Quote Link to comment 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.