I had a .htaccess file for Rewrite on my server and was working fine. Now when I used the same code in 1and1 hosting, its not working.
May be something is wrong or unexpectedly good happening inside 1and1 servers. - Options +FollowSymLinks
-
RewriteEngine on
-
RewriteRule /id/(.*)/name/(.*) index.php?id=$1&name=$2
If anyone knows what's required to be changed to make it work on 1and1, please let me know.
Thanks
8 4036
does your 1&1 account support mod_rewrite? (check in phpinfo())
Check your error logs (apache).
Moved this to misc because it isn't PHP nor Apache.
@Markus
At least people go to PHP forum... no body goes to misc. ;)
Anyway, I think there's some problem with 1and1 ... many people have similar problem, and nobody got any solution.
@hsriat
I disagree; I go to misc on my daily 'rounds'. But, then again, I have a pretty boring life at the moment.
Try a host better than 1and1?
Umm... that's what is not in my hands.
Anyhow, can you tell me how would you do this rewrite: www.example.com/index.php?id=wolves&name=Markus
to www.example.com/wolves/Markus
What I did was this: - Options +FollowSymLinks
-
RewriteEngine on
-
RewriteBase /
-
RewriteRule /([^/]+)/([^/]+) /index.php?id=$1&name=$2 [L]
@hsriat
Sure. I'd do it something like this: -
Options +FollowSymLinks
-
RewriteEngine on
-
RewriteBase /
-
# Note: no leading /
-
# Not sure what characters you want to allow, but you can expand the character set to incorporate them.
-
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ /index.php?id=$1&name=$2 [L]
-
If you do only want to match alpha-numeric characters, you can use the expression '\w+' instead of the character sets [a-z...].
Unfortunately 1and1 didn't like this one too.
Anyhow, thanks for the help Markus.
Cheers
@hsriat
That's a shame :/ I don't know how I'd live without .htaccess access...
Np,
Mark.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Nel |
last post by:
Just looking for some general advice on modifying the URL for php.
I am using .htaccess to allow a web site to translate example.html to
index.php?content=example
(below)
ErrorDocument 404...
|
by: Taki Jeden |
last post by:
Hello everybody
Does anybody know why w3c validator can not get pages that use 404 htaccess
redirection? I set up two web sites so that clients request non-existent
urls, but htaccess redirects...
|
by: somaboy mx |
last post by:
Hello
I need people to be able to complete long text blocks in my cms before
their session times out. From the php documentation I gather that ini
directive session.gc_maxlifetime would be the...
|
by: Don Conrad |
last post by:
Has anyone used this hosting service? I'm considering it (linux based)
and was wondering if anyone had any experience with them.
TIA.
Don
|
by: deko |
last post by:
I'm trying to redirect requests for /index.php to /mydirectory/index.php
If I use an index file in / with only this line:
<?php header("Location:http://www.mysite.com/mydirectory/"); ?>
that...
|
by: asherwolf |
last post by:
Hi,
I'm trying to do something I think is pretty neat, but I've just about pulled my hair out by the behavior of my server. I'm hosting on GoDaddy, using a subdomain (www.mywebpage.com maps to...
|
by: invertigo |
last post by:
Hello,
Im using this .htaccess file to rewrite my websites URL. Reason i try
to do this is to make it more SEO friendly.
Code:
--------------------------------------------------------
Options...
|
by: Joe |
last post by:
Hello, I currently have a file system where images and assets are
stored in a directory like this:
http://www.domain.com/assets/media/CLIENT_NAME/uploads/CLIENT_DIR/CLIENT_FILES
Which holds...
|
by: adnanjunk |
last post by:
Hi,
Having a little issue with .htaccess not working on windows server. I
have clean url's setup using the htaccess file, working fine on linux
server. I have researched for a while and found...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |