rewrite url parameters with htaccess?


New Member

been trying to find a htaccess forum on the internet but havent found any so i hope that maybe you guys could help me.

at the moment my url look like this:

sometimes only one of the parameters are set ie:

I want to rewrite the url to look like

the file is not always the same file so i guess {SCRIPT_FILENAME} or something has to be used.

I do at the moment hide .php extension. I dont know if you need to have that information or not:

RewriteEngine on
RewriteBase /

# Remove php extension
rewritecond %{SCRIPT_FILENAME}.php -f
rewriterule [^/]$ %{REQUEST_URI}.php [QSA,L]
rewriterule ^(.*)/$ $1 [R=301,L]

i tried doing this but it didnt make it work
RewriteRule ^([^/]+)/([^/]+)$ test.php?t=$a
Last edited:


New Member
This is the normal way many CMS work. It's certainly not cloaking. It's a normal redirect from ?id=12345 to /pretty-url/ - nothing cloaked about it.

Kodi nox
Last edited:

Members online

No members online now.

Latest posts