Hi,
How are the rules used in .htaccess to convert
this: www.example.com/playsong.php?id=1
in this: www.example.com/paysong/1/
Thanks.
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteRule ^paysong/([0-9]+)/$ /paysong.php?id=$1 [L]
Options +FollowSymlinks All -Indexes -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^accounts/([0-9]+)/\?page=([0-9]+)$ /accounts/?user=$1&page=$2 [QSA,L]
</IfModule>
RewriteCond %{REQUEST_URI}%{QUERY_STRING} ^/accounts/?user=([0-9]+)&(.*)$ [NC]
RewriteRule ^accounts/.*$ /accounts/%1/?%2 [L]
Options All
Options +FollowSymLinks -Indexes -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^accounts/([0-9]+)/?$ /accounts/?user=$1 [QSA,L]
</IfModule>
richardk wrote:REQUEST_URI in Apache does not include the query string but it does in PHP.
Return to Friendly URLs with Mod_Rewrite
Users browsing this forum: No registered users and 95 guests