Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

I was having trouble with the htaccess too. But since I know 1and1 "tech support" are total tools, I just mucked about to find an answer.

 

Here's what seems to work. (BTW FRW Media, TOP SHELF addon here. Great docs, etc. I had to hand add it to a modded 2.3 site and your directions were spot on!)

 

<IfModule mod_rewrite.c>
 RewriteEngine On

 # RewriteBase instructions
 # Change RewriteBase dependent on how your shop is accessed as below.
 # http://www.mysite.com = RewriteBase /
 # http://www.mysite.com/catalog/ = RewriteBase /catalog/ 
 # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/

 # Change RewriteBase using the instructions above  
 RewriteBase / 
 RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
 RewriteRule ^(.*)-c-([0-9_]+).html$ index.php [NC,L,QSA]
 RewriteRule ^(.*)-m-([0-9]+).html$ index.php [NC,L,QSA]
 RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
 RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
 RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
 # Articles contribution
 RewriteRule ^(.*)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
 RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
 # Information pages
 RewriteRule ^(.*)-i-([0-9]+).html$ information.php [NC,L,QSA]
 # Links contribution
 RewriteRule ^(.*)-links-([0-9_]+).html$ links.php [NC,L,QSA]
 # Newsdesk contribution
 RewriteRule ^(.*)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
 RewriteRule ^(.*)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
 RewriteRule ^(.*)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
 RewriteRule ^(.*)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]
</IfModule>

 

So it seems that the "[a-z0-9-/]+" part of the rules is the bone in contention on 1and1 (bear in mind they use a server farm of C64s powered by malnourished squirrels).

 

So, do you see any potential problem with my version?

 

Also, it doesn't seeem to matter if I use +FollowSymLinks or +SymLinksIfOwnerMatch, so which should I use? Or should I use both?

Share this post


Link to post
Share on other sites

I was having trouble with the htaccess too. But since I know 1and1 "tech support" are total tools, I just mucked about to find an answer.

 

Here's what seems to work. (BTW FRW Media, TOP SHELF addon here. Great docs, etc. I had to hand add it to a modded 2.3 site and your directions were spot on!)

 

So it seems that the "[a-z0-9-/]+" part of the rules is the bone in contention on 1and1 (bear in mind they use a server farm of C64s powered by malnourished squirrels).

 

So, do you see any potential problem with my version?

 

Also, it doesn't seeem to matter if I use +FollowSymLinks or +SymLinksIfOwnerMatch, so which should I use? Or should I use both?

 

Hi Ted ( if your name is Ted ) :)

 

Thanks for the kind words and for testing these rules for me.

 

You should most definately use the one that was not commented out +SymLinksIfOwnerMatch it is much more secure. ( I'm surprised 1 and 1 allow the other ).

 

Could you try the following for me please?

 

[a-z0-9\-\/]+

 

so it would look like ..

 

RewriteRule ^([a-z0-9\-\/]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]

Edited by FWR Media

Share this post


Link to post
Share on other sites

Installed just fine and everything is working great except one item. Thank you. Looks like you worked hard and have a great product.

 

I upgraded from the old chemo system which used to swtitch back to a NONSSL link whe you are on a shred SSl page . Now when you are on a shared SSL page such as during checkout and you click on a category or product - it keeps the same shared SSL URL and we get a: Oops! This link appears broken.DNS error occurred. Server cannot be found. error

 

Of course, all non product or category pages still work the same, no problems.

 

How can we adjust it so we always go to a NONSSL category or product info page whether we are on a NONSSL or shared SSL page?

Share this post


Link to post
Share on other sites

Installed just fine and everything is working great except one item. Thank you. Looks like you worked hard and have a great product.

 

I upgraded from the old chemo system which used to swtitch back to a NONSSL link whe you are on a shred SSl page . Now when you are on a shared SSL page such as during checkout and you click on a category or product - it keeps the same shared SSL URL and we get a: Oops! This link appears broken.DNS error occurred. Server cannot be found. error

 

Of course, all non product or category pages still work the same, no problems.

 

How can we adjust it so we always go to a NONSSL category or product info page whether we are on a NONSSL or shared SSL page?

 

Not sure what you mean .. this works just like the standard osC tep_href_link and Chemos, it defaults to NONSSL unless SSL is specifically passed through.

Share this post


Link to post
Share on other sites

One other thing I just noticed

 

We are now getting ?osCsid=d3fc6fcfaa8a733c2e21ba0719209501 at the end of every URL on any file such as:

checkout_payment.php?osCsid=6cd90849f89c5626b8f0ec5d3b75fa55

 

This must be a result of this upgrade also. We had filtered that out from showing with .htaccess code and/or another contribution but it looks like ULTIMATE Seo Urls 5 is forcing that on the end now.

 

How can we lose that trailing ?osCsid so the customer or google does not see it?

 

Thank you again

Share this post


Link to post
Share on other sites

When you are on the main index page everything works fine. You are in the root of the site at that point and using our domain name.

Then when you checkout from the shopping cart you enter into a shared SSL page which has a totally different domain and URL named after the server we are on

 

So if you click on a product picture in the left column you stay in the shred SSL domain instead of going back to our NONSSL domain.

The name of the product is correct and the same but the domain in front of it does not switch back.

Share this post


Link to post
Share on other sites

When you are on the main index page everything works fine. You are in the root of the site at that point and using our domain name.

Then when you checkout from the shopping cart you enter into a shared SSL page which has a totally different domain and URL named after the server we are on

 

So if you click on a product picture in the left column you stay in the shred SSL domain instead of going back to our NONSSL domain.

The name of the product is correct and the same but the domain in front of it does not switch back.

 

Could you try something for me please?

 

catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php

 

Find ..

 

$this->urlInitial = Usu_Main::i()->getVar( 'request_type' ) == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' );

 

Change to ...

 

$this->urlInitial = $connection == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' );

Share this post


Link to post
Share on other sites

Could you try something for me please?

 

catalog/includes/modules/ultimate_seo_urls5/abstracts/page_modules.php

 

Find ..

 

$this->urlInitial = Usu_Main::i()->getVar( 'request_type' ) == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' );

 

Change to ...

 

$this->urlInitial = $connection == 'NONSSL' ? Usu_Main::i()->getVar( 'base_url' ) : Usu_Main::i()->getVar( 'base_url_ssl' );

 

Totally wonderful !!!

 

Works great everywhere now. I tested it on the login page too. Both the categories (which is cached and I thought that might be an issue) and the product_info links work normal form NONSSL and SSL pages.

 

Hope my problem helps you - maybe include this info or change code for others?

 

thank you so much for the super quick replies

Share this post


Link to post
Share on other sites

Totally wonderful !!!

 

Works great everywhere now. I tested it on the login page too. Both the categories (which is cached and I thought that might be an issue) and the product_info links work normal form NONSSL and SSL pages.

 

Hope my problem helps you - maybe include this info or change code for others?

 

thank you so much for the super quick replies

 

Very glad to help you and thanks for helping me!

 

The bad news is that you uncovered a nasty .. BIG .. HAIRY bug.

 

Regarding the osCsid this is not a problem of the contribution .. it produces the session id when it is correct to do so .. you should NEVER need to hide the osCsid .. if you do have to it simply means your config files are wrong.

 

thanks again Randy.

Share this post


Link to post
Share on other sites

IMPORTANT

 

Randy uncovered a nasty bug.

 

Everyone who has downloaded this needs to apply the change in the below post ..

 

http://forums.oscommerce.com/topic/336702-ultimate-seo-urls-5-by-fwr-media/page__view__findpost__p__1554022

 

In the mean time I will upload a new revision and get the current one supressed.

Share this post


Link to post
Share on other sites

Sorry should have mentioned .. the above comment relates only to the brand new PRO version and not to the original USU5.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hi Ted ( if your name is Ted ) :)

 

Thanks for the kind words and for testing these rules for me.

 

You should most definately use the one that was not commented out +SymLinksIfOwnerMatch it is much more secure. ( I'm surprised 1 and 1 allow the other ).

 

Could you try the following for me please?

 

[a-z0-9\-\/]+

 

so it would look like ..

 

RewriteRule ^([a-z0-9\-\/]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]

 

It does NOT cause a 500 error, but it does result in a 404 error...

Share this post


Link to post
Share on other sites

It does NOT cause a 500 error, but it does result in a 404 error...

 

Sorry to impose on you Ted but I have tried this on 5 servers and can't replicate the problem so need some help on the 1 and 1 issue.

 

Could you try ..

 

[a-z0-9-\/]+

 

[a-z0-9\-/]+

 

[a-z0-9/-]+

 

[a-z0-9\/-]+

 

[a-z0-9/\-]+

Edited by FWR Media

Share this post


Link to post
Share on other sites

Also, just FYI, your 404 page for when items/cats are not found is missing <html><head> and <body> tags...

 

Well tbh it's an error page it has no reason to validate and no intention to index.

Share this post


Link to post
Share on other sites

Sorry to impose on you Ted but I have tried this on 5 servers and can't replicate the problem so need some help on the 1 and 1 issue.

 

Could you try ..

 

[a-z0-9-\/]+

 

[a-z0-9\-/]+

 

[a-z0-9/-]+

 

[a-z0-9\/-]+

 

[a-z0-9/\-]+

 

 

# 500 RewriteRule ^([a-z0-9-\/]+).html$ product_info.php [NC,L,QSA]
# 500 RewriteRule ^([a-z0-9\-/]+).html$ product_info.php [NC,L,QSA]
# W  RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA]
# W  RewriteRule ^([a-z0-9\/-]+).html$ product_info.php [NC,L,QSA]
# W  RewriteRule ^([a-z0-9/\-]+).html$ product_info.php [NC,L,QSA]

 

Where I used "W" it worked fine, no difference in behavior from what I could see. Where I used "500" it threw a 500 Internal Server Error at me. :shrugs: :huh:

 

(So which one should I use? :blink: )

 

Well tbh it's an error page it has no reason to validate and no intention to index.

 

Fair enough! :D

Edited by TedThompson

Share this post


Link to post
Share on other sites

# 500 RewriteRule ^([a-z0-9-\/]+).html$ product_info.php [NC,L,QSA]
# 500 RewriteRule ^([a-z0-9\-/]+).html$ product_info.php [NC,L,QSA]
# W  RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA]
# W  RewriteRule ^([a-z0-9\/-]+).html$ product_info.php [NC,L,QSA]
# W  RewriteRule ^([a-z0-9/\-]+).html$ product_info.php [NC,L,QSA]

 

Where I used "W" it worked fine, no difference in behavior from what I could see. Where I used "500" it threw a 500 Internal Server Error at me. :shrugs: :huh:

 

(So which one should I use? :blink: )

 

 

 

Fair enough! :D

 

Sorry to confuse you Ted and the range of options proved that I myself was confused.

 

The problem my end is that I learnt the newer and more widely used PCRE but never learnt the old POSIX but PCRE and POSIX have a lot of similarities that normally get me through .. but ..

 

Apache 1.3 shipped with POSIX .. later versions had compatibility with PCRE but a lot of PCRE doesn't actually work .. so .. I get a bit confused.

 

Back to the problem at hand ..

 

Seems to me like it may be as simple as ..

 

^([a-z0-9-/]+)

 

Doesn't work .. whereas ..

 

^([a-z0-9/-]+)

 

does.

 

could you try it please?

 

Once we have this nailed I will release a new revision covering this and the "Randy" bug.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Sorry to confuse you Ted and the range of options proved that I myself was confused.

 

The problem my end is that I learnt the newer and more widely used PCRE but never learnt the old POSIX but PCRE and POSIX have a lot of similarities that normally get me through .. but ..

 

Apache 1.3 shipped with POSIX .. later versions had compatibility with PCRE but a lot of PCRE doesn't actually work .. so .. I get a bit confused.

 

Back to the problem at hand ..

 

Seems to me like it may be as simple as ..

 

^([a-z0-9-/]+)

 

Doesn't work .. whereas ..

 

^([a-z0-9/-]+)

 

does.

 

could you try it please?

 

Once we have this nailed I will release a new revision covering this and the "Randy" bug.

 

# 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA]

# W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA]

 

Again, "500" errs, and "W" works, so it would appear that you are correct. (I don't get any of these comparison strings myself...)

Share this post


Link to post
Share on other sites

# 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA]

# W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA]

 

Again, "500" errs, and "W" works, so it would appear that you are correct. (I don't get any of these comparison strings myself...)

 

That's great Ted thanks for your support.

 

^([a-z0-9/-]+)

 

Is the way to go then .. I will update the contribution.

Share this post


Link to post
Share on other sites

That's great Ted thanks for your support.

 

^([a-z0-9/-]+)

 

Is the way to go then .. I will update the contribution.

 

So this is what I have now

 

# If you are getting errors you may need to comment this out like ..
# Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
<IfModule mod_rewrite.c>
 RewriteEngine On

 # RewriteBase instructions
 # Change RewriteBase dependent on how your shop is accessed as below.
 # http://www.mysite.com = RewriteBase /
 # http://www.mysite.com/catalog/ = RewriteBase /catalog/ 
 # http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/

 # Change RewriteBase using the instructions above  
 RewriteBase / 

# 500 RewriteRule ^([a-z0-9-/]+).html$ product_info.php [NC,L,QSA]
# W RewriteRule ^([a-z0-9/-]+).html$ product_info.php [NC,L,QSA]

 RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
 # Articles contribution
 RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
 # Information pages
 RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA]
 # Links contribution
 RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA]
 # Newsdesk contribution
 RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
 RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]
</IfModule>

 

Correct?

Edited by TedThompson

Share this post


Link to post
Share on other sites

So this is what I have now

 

Correct?

 

Spot on.

Share this post


Link to post
Share on other sites

Thank YOU for the support!! :lol:

 

 

Been busy the last couple of days, though I did find out 1&1 have strict regex and was going to look into it,

 

Very thankful here too, it works great!

Share this post


Link to post
Share on other sites

I forgot to mention the sitemap generator dosent work for me, all I get is a blank page.

 

If I change:

 

chdir( '../' );

To anything else like below then I get path errors etc, but the sitemapindex.xml is generated.

 

chdir( '.../' );

 

Also tried the below that just prints out the path, but the chdir is the same as "../" :

 

$mypath="/homepages/45/d56756756/htdocs/www/";
chdir($mypath);

// current directory
echo getcwd() . "\n";

Share this post


Link to post
Share on other sites

I forgot to mention the sitemap generator dosent work for me, all I get is a blank page.

 

If I change:

 

chdir( '../' );

To anything else like below then I get path errors etc, but the sitemapindex.xml is generated.

 

chdir( '.../' );

 

Also tried the below that just prints out the path, but the chdir is the same as "../" :

 

$mypath="/homepages/45/d56756756/htdocs/www/";
chdir($mypath);

// current directory
echo getcwd() . "\n";

 

You don't need to change the file.

 

PM me your email address and I'll send you a new file to try.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×