phalguni_mookhopadhayay
asked on
mod_rewrite
hi,
i want to show the url -http://rid-international.de/rid/shop.php?menu_id=19&lang=eng to
-http://rid-international.de/rid/shop.php/19/eng
what should be the rewrite rule?
i try the following rules but does not work.please let me know if you have any suggession .
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]+)/([^/]+)/([^/]+)?$ shop.php?lang=$2&menu_id=$ 1 [nc]
with thanks & regards,
Arundhuti
i want to show the url -http://rid-international.de/rid/shop.php?menu_id=19&lang=eng to
-http://rid-international.de/rid/shop.php/19/eng
what should be the rewrite rule?
i try the following rules but does not work.please let me know if you have any suggession .
RewriteEngine on
RewriteBase /
RewriteRule ^([^/]+)/([^/]+)/([^/]+)?$
with thanks & regards,
Arundhuti
oups... my mistake
TRY THIS ONE:
RewriteRule rid/shop.php/([^/]+)/([^/] +) rid/shop.php?menu_id=$1&la ng=$2
and tell me if it works
TRY THIS ONE:
RewriteRule rid/shop.php/([^/]+)/([^/]
and tell me if it works
ASKER
sorry,it not works.If you have any other suggestion please let me know.
thnx for your response.
thnx for your response.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1) Are you loading mod_rewrite in your httpd.con, or included .conf file e.g.
LoadModule rewrite_module xxxxxxxxxxxx/mod_rewrite.s o
2) Where are you adding the rules: in the apache httpd.conf or a .htaccess file?
a) If the httpd.cont, then the following in the appropriate Virtualhost definition should do:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/rid/shop.php/([^/]*)/([^ /]*)[/]* /rid/shop.php?menu_id=$1&l ang=$2 [L]
b) If a .htaccess you must have an "AllowOverride" line in you httpd.conf, to allow the use of .htaccess files, along with a suitable option to the command e.g. all
c) Which directories .htaccess are you placing the rules in?
If it's the root, then the following may work:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^rid/shop.php/([^/]*)/([^/ ]*)[/]* /rid/shop.php?menu_id=$1&l ang=$2 [L]
LoadModule rewrite_module xxxxxxxxxxxx/mod_rewrite.s
2) Where are you adding the rules: in the apache httpd.conf or a .htaccess file?
a) If the httpd.cont, then the following in the appropriate Virtualhost definition should do:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/rid/shop.php/([^/]*)/([^
b) If a .htaccess you must have an "AllowOverride" line in you httpd.conf, to allow the use of .htaccess files, along with a suitable option to the command e.g. all
c) Which directories .htaccess are you placing the rules in?
If it's the root, then the following may work:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^rid/shop.php/([^/]*)/([^/
RewriteRule rid/shop.php/([^/]+)/([^/]
and tell me if it works