I'm attempting to make the best towards the default htaccess from Joomla 1.6.3 for getting an amiable url for my very own php scripts.

The concept would be that the following already working url: www.mysite.com/wrx/system/index.html?parameter1=AE23HtySght34P can externally be known as such as this, but additionally shows as: www.mysite.com/wrx/system/AE23HtySght34P/

The rule i put into the htaccess is working, but reverts it to showing the php using the parameter...

Any help could be appreciated.



Options +FollowSymLinks
RewriteEngine On

RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule .* index.php [F]

RewriteRule ^wrx/system/([A-Za-z0-9-]+)$ /wrx/system/index.php?id_parameter1=$1 [R=301,L]

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

Put that one soon after RewriteEngine on, therefore it is the very first being examined.

RewriteRule /wrx/system/([a-zA-Z0-9]+)$ /wrx/system/index.php?id_parameter1=$1 [L]
  • ([a-zA-Z0-9]+)$ catches all (1+) chars (not just numbers) till finish of url
  • [L] = last rule (with this evaluation, the rewritten url is going to be examined from the rules again)