Custom htaccess in magento - .htaccess

I want to make some custom htaccess rule for some page in magento.for this I have try to add some rewrite rule in htaccess file.but i always get 404 error.
ex.i want to rewrite http://www.mydomain.com/test/ to http://www.mydomain.com/varraible1/varraibe2/test/
please advise me some htaccess code for this.
thanks in advance

I hope URL rewrite works for you.
To enable the URL rewrite
Go to System > Configuration > Web > Search Engines Optimization and switch ‘Use Web Server Rewrites’ to Yes.
Check out the link below, to get detailed information on URL rewrite.
http://www.e-commercewebdesign.co.uk/blog/e-commerce-seo/htaccess-rewrites-for-magento-shops.php
Hope that helps

Related

Convert osclass htaccess file to web.config to run Php on IIS problem

host=windows
Enabled friendly URLs in osclass, but there is a problem , friendly URLs aren't working, and I know the problem comes from IIS webconfig file. Is there anyone using osclass on windows? And how does the problem resolve?
I'll give you one of the problematic links :
https://test.com/search/pattern,تست
As far as I know, if you enable the friendly URLs, it will add the url rewrite rule into the htaccess file.
IIS url rewrite rule contains the build-in tool which is used to convert the .htaccess to web.config.
I suggest you could find the htaccess file and add it in below tool.

.htaccess manual redirects followed by a general everything else redirect to another domain

I am trying to do a lot of manual redirects followed by a rule which will redirect everything else which isn't covered by the manual redirect.
I have already written a lot of rules following the structure shown below:
Redirect 301 /articles/1/1/1.htm http://newdomain.com/relevant-page/relevant-inner-page/
I just need to finish this off with a general redirect that will redirect all other pages not covered to the root of the new domain.
Any help or suggestions would be greatly appreciated!
I found the easiest way to do this would be to just PHP redirect in the header of the website. Works for me no problems!

htaccess redirect with parameters not working correctly

hope you can help me. i need a redirect from
/abc_company_detail.php?id=4 to detail/4/
So when I call the URL http://mydomain.com/abc_company_detail.php?id=4 then I got this pretty URL http://mydomain.com/detail/4/
You can use some PHP framework, and it will managed the URL for you. If you want to do it manually you have to configure .htacess file.
Try this link. .htaccess friendly URl
This kind of question had been asked before.

how can i hide the part of url using .htaccess

I am trying to remove the part from my url here is the url "http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/itemlist/category/3-category-2"
Now I want to remove "itemlist/category/" from the url so that url can be look link "http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/3-category-2"
I am using default functionality of joomla i.e. SEF urls, I need to simplify it more I am new for the htaccess
Please suggest link for learning how to write rules for .htaccess file
Please help
Easiest thing is just to make a menu link somewhere that goes directly to category-2. That will set up the url correctly. It will also get rid of the 3-

.htaccess redirect URL to sub-part of URL

I would like to redirect URLs (100's of them) of a site based on a pattern match.
So for example if the requested url is
http://www.example.com/showcase/properties/boston/page/1
I would like to redirect it to
http://www.example.com/showcase/properties/boston
i.e. remove the /page/1 from the actual url.
I am newbie with all .htaccess concept. So if I have missed any information to add please let me know. Also I would appreciate if somebody can point me to a nice tutorial/book for .htaccess learning.
Thanks very much in advance.
P.S. - The site is built using PHP language.
RewriteRule (.*)/page/(\d+) $1
I don't know any tutorial about .htaccess!
I have apache manual on my PC and I use it!

Resources