简体   繁体   中英

Magento URL Rewrite redirect but not change url

how to set rewrite URL for my custom module,redirect but not changing URL still use request path URL, for example:

request path : domain.com/blah
target path :  domain.com/myurl/profile/index?id=blahblah

when you open request path not redirect to target path, like on product url stay on request path, or how to remove "myurl/profile/index?id=" from htaccess ?

Thanks

there are many reason of the errors you should be sure you did not make any mistake in your .htaccess because you know it is not easy to find your mistake on your.htaccess file.

    RewriteEngine On
    RewriteBase / 
    RewriteEngine On Options All -Indexes RewriteBase /directoryname/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        ###############  SEO     ##########################



    #http://www.example.com/hello/booboo/ it takes the url  after .com/
        RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
# in index.php if you write echo $_GET['url']; you will see /hello/booboo/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM