gplana
asked on
.htaccess RewriteRule doubt
Dear Expert:
I have xampp for Windos installed locally. I have a web site which is using URLs such as:
http://localhost/ad/index.php?option=com_are&view=listado&Itemid=17&lang=es
I want this URL look like:
http://localhost/ad/es/Barcelona
I have read something about .htaccess file and RewriteRule, so I have added this line to my actual .htaccess file to accomplish this:
RewriteRUle ^/ad/es/Barcelona$ /ad/index.php?option=com_a re&view=li stado&Item id=17&lang =es [L]
After this, old URL is still working and new URL (/ad/es/Barcelona) doesn't work (it gets a 404: component not found).
What I'm doing wrong ?
Thank you.
I have xampp for Windos installed locally. I have a web site which is using URLs such as:
http://localhost/ad/index.php?option=com_are&view=listado&Itemid=17&lang=es
I want this URL look like:
http://localhost/ad/es/Barcelona
I have read something about .htaccess file and RewriteRule, so I have added this line to my actual .htaccess file to accomplish this:
RewriteRUle ^/ad/es/Barcelona$ /ad/index.php?option=com_a
After this, old URL is still working and new URL (/ad/es/Barcelona) doesn't work (it gets a 404: component not found).
What I'm doing wrong ?
Thank you.
ASKER
Wow, it worked without the leading /
Can you tell me why I cannot put a leading / ?
Can you tell me why I cannot put a leading / ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent. Thank you.
Open in new window