• OzzModz is no longer taking registrations. All registrations are being redirected to Snog's Site
    All addons and support is available there now.

URL Rewrite Rules Help

Looking for some help with url rewrite rules from someone who is far more proficient than myself. I know nothing.

Old domain = CRR Gaming
Now domain = CRR Gaming

I changed domain names and want to ensure all urls get redirected properly.
I want to ensure that all urls get redirected with www. So for example if you type
Code:
canadianriflesregiment.com
or
Code:
crrgaming.com
you go to
Code:
www.crrgaming.com/crrforums/
I also want to ensure that all urls get directed to with the "/crrforums/". For example if you type in
Code:
www.canadianriflesregiment.com
or
Code:
www.crrgaming.com
you go to
Code:
www.crrgaming.com/crrforums
.

I did just recently receive an email from paypal telling me of a IPN being sent to a URL that is failing and I think it may be due to bad rewrites =
Code:
http://www.canadianriflesregiment.com/crrforums/payment_gateway.php?method=paypal
 
RewriteEngine on
RewriteCond %{HTTP_HOST} ^canadianriflesregiment\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.crrgaming\.com$
RewriteRule ^(.*)$ http://www.crrgaming.com/crrforums/$1 [R=301,L]
 
[MENTION=106]Resistance[/MENTION], I have a doubt. Last year i have too changed my domain from olddomain.com to newdomain.com. And my .htaccess code is as follows. can you plz check my code whether it is correct or wrong?

PHP:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^newdomain.com$
RewriteRule ^/?$ "http://www.newdomain.com/" [R=301,L]

# Use PHP5.3 Single php.ini as default 
AddHandler application/x-httpd-php54s .php 
DirectoryIndex index.html.var index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html

RewriteCond %{HTTP_HOST} ^newdomain.com$
RewriteRule (.*) http://www.newdomain.com\/$1 [R=301]

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
 
You have the domain, repeated no need for it twice in the file. The one I posted above directs two domains to the one as I closed one I have but it's still active, but it still went to the same site this is what I had
Website (closed reason why it needed redirected)
Forums without www
Both now direct to forums with www

The way you have it above won't work, but if you can pm me with what you need giving me as much info as you can, I will see what I can do to help but my daughter is in labour right now so can't promise anything
 
Back
Top