sekeri
sekeri
@ilker
9 years ago
334 posts
I have the line below in the URL Mapper

/guitar_lessons/default.aspx => /lessons


When I try;
www.mysite.com/guitar_lessons/default.aspx

does not redirect but

mysite.com/guitar_lessons/default.aspx

redirects to page
www.mysite.com/lessons
as it should be.


it does not work if the link starts with www. or http://www.
updated by @ilker: 01/22/16 01:19:53PM
brian
@brian
9 years ago
10,148 posts
This isn't correct - this mapped URL:

/guitar_lessons/default.aspx => /lessons

should only work for that EXACT URL - not the ones with "music_theory" in them. I will check it out.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
sekeri
sekeri
@ilker
9 years ago
334 posts
Hello Brian,

I have corrected the links in my post. Thanks.
brian
@brian
9 years ago
10,148 posts
sekeri:
Hello Brian,

I have corrected the links in my post. Thanks.

OK the root cause of this is that you have not properly configured your .htaccess file to FORCE users to the "www" version of your site - SteveX has posted a small doc on it:

https://www.jamroom.net/ultrajam/documentation/code/1433/htaccess-tips

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
sekeri
sekeri
@ilker
9 years ago
334 posts
I did what you said and forced www version;

now both does not work
www.mysite.com/guitar_lessons/default.aspx
nor
mysite.com/guitar_lessons/default.aspx

but
mysite.com/guitar_lessons/default.aspx becomes www.mysite.com/guitar_lessons/default.aspx

before forcing at least mysite.com/guitar_lessons/default.aspx was redirecting properly
brian
@brian
9 years ago
10,148 posts
That's no good - I'm going to guess that it did not get setup right. Make sure your redirect looks like this:

# HTTP
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
RewriteRule .? http://www.mysite.com%{REQUEST_URI} [R=301,L]

And this needs to come right AFTER this line:

RewriteEngine On

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags