سؤال

Question is simple I want to rewrite http://www.mydomain.com/test123.com like http://www.mydomain.com/details.php?domain=test123.com

RewriteRule ^([^/]*)$ /details.php?domain=$1 [L]

Thanks.

هل كانت مفيدة؟

المحلول

For your rewrite URL. You can use following .htaccess

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(index.php)?$ 
RewriteCond %{REQUEST_URI} !^/details.php$ 
RewriteRule ^(.*)$ /details.php?domain=$1 [QSA,L]

It will rewrite http://www.mydomain.com/test123.com to http://www.mydomain.com/details.php?domain=test123.com

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top