[osCommerce] Rewrite rule for custom page not redirecting

Custom URLs and redirections.

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby shotputty » Thu Jun 10, 2010 12:18 am

I would purchase just about 10 more licenses for multiple OScommerce sites if this static page addition could get solved (multi language of course). Until that time I have partially SEO sites and partially just plain OScommerce. Any more tips would be greatly appreciated! :)
shotputty
Follower
 
Posts: 45
Joined: Tue May 11, 2010 2:28 pm

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby ~J~ » Thu Jun 10, 2010 6:35 am

Have you tried following code?

Code: Select all
#all_products.php - all products
RewriteRule ^all_products.php$ en/all-products? [L,R=301,QSA]
RewriteRule ^([a-z]{2})/all-products$ all_products.php?language=$1 [L,QSA]
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby shotputty » Fri Jun 11, 2010 12:20 am

yes, in this format:

Code: Select all
RewriteCond %{QUERY_STRING} ^language=([a-z]{2})$
RewriteRule ^all_products.php$ %1/all-products? [L,R=301]
RewriteRule ^([a-z]{2})/all-products$ all_products.php?language=$1 [L,QSA]


didn't work..
shotputty
Follower
 
Posts: 45
Joined: Tue May 11, 2010 2:28 pm

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby ~J~ » Fri Jun 11, 2010 4:06 am

So you didn't. Please copy and paste the code from my previous message.
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby shotputty » Fri Jun 11, 2010 8:20 am

Ok, now I put:

Code: Select all
#all_products.php - all products
RewriteRule ^all_products.php$ en/all-products? [L,R=301,QSA]
RewriteRule ^([a-z]{2})/all-products$ all_products.php?language=$1 [L,QSA]


at the bottom of .htaccess. (and change back to read only)

After that the page mydomain.com/all_products.php stays like that plus it says "page cannot be displayed" and it does not redirect to any mydomain.com/language/all-products :roll:

Maybe if you rename one file in your demo, http://www.magic-seo-url.com/demo/oscommerce/privacy2.php you will be able to see a solution ? (only the demo is not multi language unfortunately)

These rules are tougher than I thought :shock:
shotputty
Follower
 
Posts: 45
Joined: Tue May 11, 2010 2:28 pm

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby ~J~ » Fri Jun 11, 2010 12:17 pm

Then try:

Code: Select all
#all_products.php - all products
RewriteRule ^all_products.php$ en/all-products [L,R=301,QSA]
RewriteRule ^([a-z]{2})/all-products$ all_products.php?language=$1 [L,QSA]
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby shotputty » Fri Jun 11, 2010 3:03 pm

That gives me the same results :|
shotputty
Follower
 
Posts: 45
Joined: Tue May 11, 2010 2:28 pm

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby ~J~ » Fri Jun 11, 2010 4:51 pm

Are you really sure your changes stay there? Where exactly are you placing the code?
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby shotputty » Fri Jun 11, 2010 10:27 pm

I placed the code at the bottom of .htaccess all times. After the changes I make the file read only again. I know it has changed because after each failed attempt I go back to the file (first make it writeable to edit again) and undo the trial code because it makes that particular page not work.
shotputty
Follower
 
Posts: 45
Joined: Tue May 11, 2010 2:28 pm

Re: [osCommerce] Rewrite rule for custom page not redirectin

Postby ~J~ » Sun Jun 13, 2010 2:56 pm

I don't see any further problems with code. Please PM your FTP credentials. I will look what is going wrong.
~J~

Magic SEO URLs got new Home at InveoStore.com and are now available for
osCommerce, CRE Loaded, Zen Cart, PrestaShop, OpenCart, CubeCart, phpBB and phpBB3!
~J~
Magic SEO URL Founder
 
Posts: 1017
Joined: Sat Feb 02, 2008 11:07 am
Location: Prague, Central Europe

PreviousNext

Return to Custom Rewrite Rules

Who is online

Users browsing this forum: No registered users and 2 guests

cron