Page 1 of 1

.htaccess strange characters

Posted: Tue Apr 14, 2009 2:05 pm
by Fred
I have been trying to set custom rules in the .htaccess
The rules I had defined did not work, so I reverted to the original auto-generated file with a normal PASV mode FTP transfer... then, some functionalities started failing.

I noticed that URLs were "deformed". Here an example:
http://[my domain]/catalog/index.php?cPath=5_183_186%0F%22ucts_id%3D3476


After a bit of investigation, I found some strange characters in the ftp-uploaded .htaccess file, for instance in the following block:

#index.php - subcategories2 - buy now
RewriteCond %{QUERY_STRING} ^buy=now¤cy=([a-zA-Z]{3})&osCsid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^buy=now¤cy=([a-zA-Z]{3}) [OR]
RewriteCond %{QUERY_STRING} ^buy=now&osCsid=([a-z0-9]*) [OR]
RewriteCond %{QUERY_STRING} ^buy=now
RewriteRule ^([a-z0-9\-]*)-([0-9]*)/([a-z0-9\-]*)-([0-9]*)/([a-z0-9\-]*)-([0-9]*)/([a-z0-9\-]*)-([0-9]*).html$ index.php?cPath=$2_$4_$6"ucts_id=$8&action=buy_now [L,QSA]


Please look the [¤cy] and the ["] ... it appears in other parts of the file, but always in the same place : products, etc.

So I reformated all the ["] (ignoring the [¤cy] cause I do not use "currency" feature in my site), saved and uploaded again. Problem was still here. I downloaded what I had just uploaded, and found again exactly the same bad-writings, in the same place. NOTE : file is indeed rewritten, permissions are ok, I mean there is a real change of the file.

Have you seen that before? Would it do with regenerating all the .htaccess ? What are the risks or possible losses at regenerating? And also, how can I then add custom rules?

Thanks for your help

Re: .htaccess strange characters

Posted: Wed Apr 15, 2009 4:59 am
by Fred
Problem solved...

I have no clear explanation, but today I have edited the file in Notepad, made an automatic replace of all strange characters (in currency and products parameter strings), uploaded again (same FTP) and... it works.

I can imagine a text editor is a better idea to edit a .htaccess file, but is there a contraindication for using dreamweaver?

Cart  
(empty)

Cart Check out  »

Prices are tax inclusive.

The VAT rate for your country (US) * is 0,0 % because it is not a member of the European Union (EU).

* Please create an account if your country does not match.

Community feed
  • [Zen Cart] Can't execute Magic SEO URLs sitemaps
    I installed Magic SEO URLs Sitemaps Add-On for ZenCart MSU4.x/MSU5.x 2.0 on my server, when I try to generate sitemaps using: https://www.pechesudv155.owally.com/sitemaps.php I received :...
    by peter@pechesud.com
  • [phpBB3] Sharing users between phpBB / PrestaShop
    Hi i have 2 question 1- prestashop module support phpBB 3.3 ? 2- why we can not login in prestashop and phpbb with same user?
    by zohall
  • [phpBB3] AJAX Userinfo Extension
    Hi! I'm having trouble with this extension: https://www.phpbb.com/customise/db/exte ... _userinfo/ I tried asking support from the author but for no avail, since now. My request for support...
    by Lord Phobos
  • [phpBB3] Upgrade to phpBB 3.2.3
    Hello.. after Upgrade to phpBB 3.2.3 I am getting this message.. How can I solve this issue..? Thank you
    by ingbrzy
  • [phpBB3] URL path changed
    Hello.. I have changed my site path after moving to new hosting and now can not activate SEO module.. new path http://www.miuios.cz/domains/miuios.cz/ could you help me? thank you
    by ingbrzy2
Join our support forum » Pre-Sales Questions »
Featured Testimonials

Wow, thank you very much! Excellent support like this is greatly appreciated!

Todd, the owner of Pez Collectors Store

The support provided by the Inveostore.com team was top-notch! I had some questions regarding installation and they provided fast and friendly help. I’ll be recommending Magic SEO URLs to anyone who needs a quality URL re-write application from a great company.

Andrew, the owner of Right Channel Radios

More Testimonials »