Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I want to rewrite some url by using .htaccess rewrite

I have url something like this:

domain.com/app/index.php/appmedia/default/login

and want to rewrite users to

domain.com/app/index.php/zurmo/default/login

So, what will happen is users will see appmedia in browser but in the backend it will access zurmo

I'm new to php and have read some blogs like this have no luck

Also, have tried this

RewriteEngine On
RewriteRule ^app/index.php/appmedia/default/login.*$ http://domain.com/app/index.php/zurmo/default/login [R=301,L]

it says The page isn't redirecting properly

Edit of .htaccess file

RewriteEngine On
RewriteRule ^app/index.php/appmedia/default/login.*$ http://mydomainx.com/app/index.php/zurmo/default/login [R=301,L]
share|improve this question
    
Is /app/ a real directory? –  anubhava 41 mins ago
    
@anubhava yes, its codeignitor I think and when I inspect browser...for ex, domain.com then its showing navigated to domain.com/app..../login –  Just code 40 mins ago
    
Ok then can you provide .htaccess which is in /app/ (if any) –  anubhava 39 mins ago
    
@anubhava there isn't any .htaccess inside it. –  Just code 38 mins ago
    
ok then show content of DocumentRoot/.htaccess –  anubhava 28 mins ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.