PDA

View Full Version : url rewrite not affecting on my domain



jayminkey
01-30-2012, 12:11 PM
Hi,

I am using my custom MVC php framework.

my current url is http://www.mydomain.com/index.php?view=virtuemart-developement....i want http://www.mydomain.com/virtuemart-developement

my .htaccess file look like...

Options +FollowSymlinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?view=$1 [L,QSA]

but it doesn't affect on my website. I didn't get any error...site is working fine.

can anyone help me in this?

abduraooft
01-30-2012, 12:19 PM
What do you get when you have http://www.mydomain.com/virtuemart-developement in the address bar?

jayminkey
01-30-2012, 01:06 PM
page is working fine when i have http://www.mydomain.com/virtuemart-developement

but it doesn't affect on my website directly when i visit http://www.mydomain.com/index.php?view=virtuemart-developement

abduraooft
01-30-2012, 01:21 PM
Check http://www.itsalif.info/content/apache-htaccess-redirect-old-urls-new-urls-after-rewrite-urls-have-been-applied

jayminkey
02-01-2012, 04:41 AM
thanks got it...
could you please help me what changes should i make to my current .htaccess code for url rewrite which Permanently moved my urls?

Thanks

razzbee
02-01-2012, 01:21 PM
Please clear,now which of the url do you want to use..If you are using rewrite rules in your site,short page linkage (eg. <a href='page.html'>page</a>) will give a problem, it should be (eg. <a href='site_url.com/page.html'>Page Url</a>
I hope it helps,but be clearer

jayminkey
02-02-2012, 05:22 AM
i am using full urls.....<a href='site_url.com/page.html'>Page</a>

actually my php mvc framework ...controller doesn't support hyphen(-) in controller class name.

from http://www.mydomain.com/index.php?view=virtuemartdevelopement to http://www.mydomain.com/virtuemartdevelopement working file but i want http://www.mydomain.com/virtuemart-developement

when i use /virtuemart-developement it gave me controller parse error....also i google it that (-) treated as a minus symbol and results in a parse error.

So is their any another workaround for this?

jayminkey
02-25-2012, 05:47 AM
Hi,

i need help,

below code is working fine for url rewrite,

http://www.mydomain.com/index.php?view=magento-theming
TO http://www.mydomain.com/magento-theming


Options +FollowSymlinks
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?view=$1 [L,QSA]

but i want to set as ....http://www.mydomain.com/index.php?view=magento-theming TO http://www.mydomain.com/magento-service/magento-theming

i need to add magento-service in between

i try below code but not working


Options +FollowSymlinks
RewriteEngine on

RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?view=$1 [L,QSA]
RewriteRule ^magento-service/(.*)$ index.php?view=magento-designing [L,QSA]

i need sub directory like url.....actually in my framework there is no any sub directory like structure.

can anyone help me in this?

thanks,