Forum Moderators: phranque
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^classifieds/([0-9a]+)/([0-9a-z-]+).html$ classifieds.php?lan=en&cid=$1&title=$2 [NC,L]
RewriteRule ^photos/([0-9a-z-]+)/([0-9a-z-]+)/([0-9-]+)/([0-9a-z-]+).html$ photos.php?descr=$1&secc=$2&data=$3&pid=$4 [NC,L]
RewriteRule ^forum/([a-z-]+)/([a-z-]+)/([0-9-]+)/([0-9a-z-]+).html$ forum.php?secc=$1&secca=$2&title=$3&fid=$4 [NC,L]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([a-z0-9]+)\/?$ profile.php?username=$1
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([a-z0-9]+)\/?$ profile.php?username=$1
If I call an existing directory without ending slash, for example:
[mydomain...]
it rewrites in this way:
[mydomain...]
And of course [mydomain...]
causes 404 error.
RewriteRule ^([^/.]+)$ /profile.php?username=$1 [L,QSA] http://mydomain/existing-directory http://mydomain/existing-directory/?username=existing-directory. http://mydomain/username/ If I call an existing directory without ending slash, for example:
http://www.example.com/existing-directory
it rewrites in this way:
http://www.example.com/existing-directory/?username=existing-directory.
RewriteRule ^([^/.]+)$ /profile.php?username=$1 [L,QSA]