Magento Forum

   
Page 1 of 2
Mod_rewrite via htaccess? 
 
o4tuna
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2007-10-13
 

I have a little unix package on 1and1. defualt php version is 4.4.7. i can use php5 by a statement in htaccess. Mod_rewrite isn’t enabled, but I was told could enable it myself by 1and1. i assume that I have to do this via htaccess. Can someone tell me how to do this, or point me to something?
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kenn
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2007-11-01
 

Hi There,

In order to install Magento, you need version 5.2 or higher, else you will get an error message prompting you to install PHP 5.2 and above.

Please visit here (Magento System Requirement) --> http://www.magentocommerce.com/system-requirements

 
Magento Community Magento Community
Magento Community
Magento Community
 
o4tuna
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2007-10-13
 
o4tuna - 04 November 2007 06:03 AM

defualt php version is 4.4.7. i can use php5 by a statement in htaccess.

Running php 5.2.4 via .htaccess. I pulled the version from a phpinfo() script.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iblastoff
Sr. Member
 
Total Posts:  252
Joined:  2007-08-31
 

wouldn’t RewriteEngine On in your htaccess (along with with your various RewriteCond’s) work just fine? why don’t you ask your host..

 
Magento Community Magento Community
Magento Community
Magento Community
 
o4tuna
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2007-10-13
 

Well, that’s why I was asking.  did quiz the fine folks at 1and1 and they said I could turn it on via .htaccess, but they did not provide any php scripting support, But they did give me a few links to follow (a list of google returns). So, Since I don’t know what .htaccess should contain in order to get Magento running, I thought I would ask here.  Seem to be the logical thing to do.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Kenn
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2007-11-01
 

<IfModule mod_php5.c>
    
php_flag magic_quotes_gpc off
    php_flag short_open_tag on
</IfModule>

DirectoryIndex index.php

RewriteEngine on
RewriteCond 
$!^(index\.php|media|skin|js|robots\.txt)
RewriteRule ^(.*)$ /magento/index.php/$1 [L]
#RewriteBase /

Try the code above to see if that work for you, by the way the default .htaccess has already turn on the mod_rewrite

RewriteEngine on - Turns on mod_rewrite
RewriteBase / - Uses the root directory as the starting point for all URL’s in the .htaccess file.

Please let me know if this help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
o4tuna
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2007-10-13
 

Ok, I’m still getting a 404 error when i try to call the install page. I’m doing this via http://www.helpmebuildthishouse.com/mage/ . I read a thread where Moshe replied to another user who was getting a 404 error saying that mod_rewite wasn’t enabled.

here is what I have in my .htaccess file. the first line was added so i could use php5 instead of the default php4. any help would be greatly appreciated.

AddType x-mapp-php5 .php

<IfModule mod_php5.c>           
    
php_flag magic_quotes_gpc off
    php_flag short_open_tag on
</IfModule>

DirectoryIndex index.php

RewriteEngine on

#RewriteBase /

RewriteCond %{REQUEST_URI} !^/media/
RewriteCond %{REQUEST_URI} !^/skin/
RewriteCond %{REQUEST_URI} !^/js/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteCond 
%{REQUEST_FILENAME} !-l

RewriteRule 
.* index.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

o4tuna: there’s a simple way to test if your mod_rewrite is enabled: edit your .htaccess like this:

#RewriteRule .* index.php
RewriteRule .* http://www.google.com/
If it is enabled you should be redirected to google for any non-existant URL under folder you have .htaccess on your website.

 
Magento Community Magento Community
Magento Community
Magento Community
 
iPhony
Member
 
Avatar
Total Posts:  37
Joined:  2007-09-01
 

I am having a similar issue. I tried the redirect that you suggested and it works find and redirects me to google.com.

However I can’t get the right htaccess setting to even access the installtion page.

Any further assistance would be greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
o4tuna
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2007-10-13
 

Ah, I love those who teach by leading. I did as you suggested and change the RewriteRule .* to http://www.google.com and it worked, which got me to thinking. I changed the path from index.php to /mage/index.php and rapture followed. Now if i can only apply this to my female relationships, I’ll have it made. Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
phantom_amd64
Jr. Member
 
Total Posts:  1
Joined:  2007-12-07
 

i tried on xampp but not runing , i am installing cscart, oscommerce and other no problem but magento dont run
, I’m still getting a 404 error when i try to call the install page.

 
Magento Community Magento Community
Magento Community
Magento Community
 
YoavKutner
Guru
 
Avatar
Total Posts:  491
Joined:  2007-08-08
 

@phantom_amd64 - Did you follow this KB post?

Thanks

yoav

 
Magento Community Magento Community
Magento Community
Magento Community
 
emnoiinay9
Jr. Member
 
Total Posts:  1
Joined:  2009-09-06
 

Up up,plz say “THANK” to usefultopic, Love u! grin
installing electric radiant floor heating systems cost heat hydronic need help for installing radiant floor heating systems, wondering the costs? installing electric radiant floor heating systems cost heat hydronic

 
Magento Community Magento Community
Magento Community
Magento Community
 
valse
Jr. Member
 
Total Posts:  3
Joined:  2009-10-10
 

Hi…

...I have installed magento in “magento” folder but if I active rewrite function from admin every url like “magento/wishlist/” return 404 error.

I tried all the possible solution:

- uncomment RewriteBase /magento/
- test RewriteRule .*http://www.google.com and works
- clear cache

I save session to database

I have a php.ini with these settings:

magic_quotes_gpc = off
flag session.auto_start = off
zlib.output_compression = on
suhosin.session.cryptua = off
zend.ze1_compatibility_mode = off
extension=mcrypt.so
extension=pdo.so
extension=pdo_mysql.so
short_open_tag = on
memory_limit = 32M

in my magento folder and its subfolder downloader.

I can’t undertand why it doesn’t work?!

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
valse
Jr. Member
 
Total Posts:  3
Joined:  2009-10-10
 

I have a new fresh install (1.4.0.1) here:

http://ns46.mochahost.com/~valse82/magento/

but url rewrite doesn’t work again…

any suggest?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rtpmatt
Jr. Member
 
Total Posts:  1
Joined:  2010-08-29
 

you may need to modify your apache config to allow .htaccess to be overwritten.
In Ubuntu

/etc/apache2/sites-available/default

change
AllowOverride None
to
AllowOverride all

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2