Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 6 of 6
Search took 0.13 seconds.
Search: Posts Made By: handlegeek
Forum: Apache configuration 08-28-2012, 06:28 PM
Replies: 2
Views: 1,025
Posted By handlegeek
Below code works well for non-www to www...

Below code works well for non-www to www redirects.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

You can refer here:...
Forum: Apache configuration 08-28-2012, 06:25 PM
Replies: 1
Views: 1,147
Posted By handlegeek
RewriteEngine On RewriteCond %{HTTP_HOST}...

RewriteEngine On
RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^abc/(.*)$ http://mysite.com/$1?abc=yes [R=301]
Forum: Apache configuration 08-28-2012, 06:12 PM
Replies: 3
Views: 1,584
Posted By handlegeek
RewriteCond %{HTTP_HOST} ^www.example.com [NC] ...

RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

Will get applied for http://www.example.com/ and hence it will redirect to http://example.com...
Forum: Apache configuration 08-28-2012, 05:55 PM
Replies: 2
Views: 733
Posted By handlegeek
There might be some compilation error with the...

There might be some compilation error with the rewrite rule in .htaccess. You can check in the apache error log which will show the line causing the error.

You can refer for a simple example of...
Forum: Apache configuration 08-28-2012, 03:49 PM
Replies: 2
Views: 1,309
Posted By handlegeek
Can you give an example of your user friendly...

Can you give an example of your user friendly URL?

I believe you want to redirect and not just rewrite. You can add 301 redirect like this which might help.

RewriteRule ^index\.php$...
Forum: Apache configuration 08-28-2012, 03:29 PM
Replies: 3
Views: 1,619
Posted By handlegeek
This is for redirecting from non-www domain to...

This is for redirecting from non-www domain to www domain
Example:
mydomain.com -> www.mydomain.com
NC => no case comparison
R=301 => 301 redirect
L => Last condition[/CODE]



This is to...
Showing results 1 to 6 of 6

 
Forum Jump

All times are GMT +1. The time now is 08:14 AM.