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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.