Hello All, I am facing an issue, as have a website which runs normally no SEO friendly url. But I need a URL in SEO style so , how can i write the .htaccess file. Example below : RewriteEngine on RewriteCond %{HTTP_HOST} ^localhost.com [NC] RewriteRule ^(.*)$ http://www.localhost.com/user/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteRule ^profile-user/(.*)/(.*)$ profile-user.php?uname=$1&id=$2 So, the URL looks like as below. http://localhost/user/profile-user/apple/11 Now the issue is as the URL works fine but other URL stop working as throwing error. Please help in this , Thanks in Advance. Please Note : I want only a single URL seo friendly other need as normal as below. http://localhost/user/profile?id=11
What development environment you use? If you are using apache under windows, it is not possible I think. You need a rewrite apache module.
If both pages return the same result, and you're worried about duplicate content, you could also set up a simple 301 redirect in the first couple lines of your php file, or even just use a canonical link in your html documents <head>