0

i am trying to have all sites come up as site.php instead of site.php?abc=1...etc

currently my .htaccess file reads:
RewriteCond %{QUERY_STRING} .+
RewriteRule ^(.*)$ /$1? [R=301,L]
Options -Indexes
But this is not working. Any help would be appreciated

2 Answers 2

1

This works:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} .+
RewriteRule ^(.*)$ /site.php? [R=301,L]
</IfModule>

Tested with apache2

1

For every page (not only "site.php"), you can use

RewriteCond %{QUERY_STRING} .
RewriteRule (.*) $1?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .