...

View Full Version : .htaccess help



abhini268
01-17-2008, 06:14 PM
Hello All,

I am working on .htaccess file having code as below,

RewriteEngine On
RewriteRule ^csp([0-9]+)$ index.php?id=$1
RewriteRule ^csa([0-9]+)$ index.php?id=$1
RewriteRule ^ID([0-9]+)$ index1.php?id=$1

The site was working with same file on other server. When we shifted the server, the problem is in redirection of files.

If I use www.mydomain.com/cd/ID1234567895/ then it works, but if I remove / from the end of url then file is not redirected to index1.php.

Do anyone have knowledge about the solution? I dont know why this problem arises. Is there any setting required for .htaccess depending on server?

Please reply asap.
Thanks in advance.

mlseim
01-18-2008, 04:22 AM
I had a similar type problem, but not identical ...

This is the only thing I can think of where I had to
add for one server but not another (line in blue):

Options +Indexes +FollowSymlinks
RewriteEngine On
RewriteRule ^csp([0-9]+)$ index.php?id=$1
RewriteRule ^csa([0-9]+)$ index.php?id=$1
RewriteRule ^ID([0-9]+)$ index1.php?id=$1

It's just a "shot in the dark", but it's worth trying.

daemonkin
01-18-2008, 01:18 PM
mlseim:

How does this actually work and if you could, can you run through how your line in blue is interpreted.

D.

mlseim
01-20-2008, 12:12 AM
Daemonkin ...

I don't know how it works ...
I just know it fixed a similar problem I had with the RewriteRules
not following my directories through the site. It was something
I thought he could try really quick and see if it works for him too.

I'm really not an expert at all with .htaccess

abhini268
01-21-2008, 07:54 AM
Hi,

Thanks for reply.
The solution that u have provided is also not working with my .htaccess file.
I am still facing the same problem


Thanks

outseeker
02-19-2008, 08:46 AM
Hello All,

I am working on .htaccess file having code as below,

RewriteEngine On
RewriteRule ^csp([0-9]+)$ index.php?id=$1
RewriteRule ^csa([0-9]+)$ index.php?id=$1
RewriteRule ^ID([0-9]+)$ index1.php?id=$1

The site was working with same file on other server. When we shifted the server, the problem is in redirection of files.

If I use www.mydomain.com/cd/ID1234567895/ (http://www.mydomain.com/cd/ID1234567895/) then it works, but if I remove / from the end of url then file is not redirected to index1.php.

Do anyone have knowledge about the solution? I dont know why this problem arises. Is there any setting required for .htaccess depending on server?

Please reply asap.
Thanks in advance.

OK so the first rule for example rewrites this:
yourwebsite.com/csp11
to this:
yourwebsite.com/index.php?id=11

the second rule is the same, but rewriting csa. The third rule is rewriting to index1.php?id=11. Now you are saying when you goto yourwebsite.com/cd/ID98743987432/. This is not rewritten by this .htaccess at all as far as I can see man, you have no line referring to the cd/ directory. Can we get a list of what exactly wants to be rewritten to what? :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum