Reputation: 37
I have one script for deleting .php from url and the secound pass a username
# activate rewrite engine
RewriteEngine On
# WordPress rules
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# username in url
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /x/profile.php?username=$1
Upvotes: 0
Views: 260
Reputation: 3411
Super simple, combine it all into one file:
RewriteEngine On
# Combined rules
RewriteRule ^(.*)$ /x/profile.php?username=$1
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Upvotes: 1