Welcome Guest, Not a member yet? Register   Sign In
Redirect by .htaccess: questionmark in URL
#1

Hi everyone,

I have a line:

Code:
RedirectPermanent /old http://www.example.com/new

in my .htaccess file, followed by:

Code:
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

I also tried it without the questionmark:

Code:
RewriteRule ^(.*)$ /index.php/$1 [L]

But this results in the error message: "No input file specified."

If I now call the URL http://www.example.com/new the addressbar of the browser shows: http://www.example.com/new?/old. But I only want it to show: http://www.example.com/new.

Is there any way to manage this? Codeigniter version is 2.0.
Reply
#2

Please try to modify

Code:
RewriteBase /

...with..

Quote:RewriteBase /new/
Reply
#3

The "old" and "new" was only one example. In fact there are some more permanent Redirects in front of the Rewrite Engine part like:

Code:
RedirectPermanent /old1 http://www.example.com/new1
RedirectPermanent /old2 http://www.example.com/new2
RedirectPermanent /old3 http://www.example.com/new3
RedirectPermanent /old4 http://www.example.com/new4
Reply




Theme © iAndrew 2016 - Forum software by © MyBB