Jump to content

Help needed with PHP url rewrite, please.


gotit

Recommended Posts

[quote author=gotit link=topic=115271.msg469410#msg469410 date=1163737114]
[quote author=doni49 link=topic=115271.msg469408#msg469408 date=1163736848]
and take a look here as well.

http://faq.1and1.com/scripting_languages_supported/configuring_apache_server_using_htaccess/4.html
[/quote]

If yours is one of the packages listed, then yes you should be able to. 

Did you take a look at the second link? 

[quote]
But you can adjust the Apache webserver properties to your needs by editing a
control file. You can list verious commands in this file enableing you to control
access to a directory, to have custom error pages,to list the content of
directories, etc.

The control file ".htaccess" can be placed in various directories of your site.
Please note that commands in a .htaccess file effect ALL subdirectories as well!

[b]If you want the changes to be applied to your entire webspace all you need to do is
place one .htaccess files containing the configuration into the maindirectory of
your space (/.)[/b]
[/quote]

This means we can use .htaccess in shared package. Does it? if yes why it's not working for me... :(
[/quote]
Link to comment
Share on other sites

Yes I did, mine is the first package.

One example 1and1 give is:

[color=red]# Example for a rewrite rule:
# (turns http://domain.com/xyz.html into http://domain.com/index.php?xyz)
#
RewriteEngine on
RewriteBase /
RewriteRule ^([a-z]+)\.html$ /index.php?$1 [R,L][/color]

It seems to me that this code does the opposit of what I want. I want my PHP URL to change into html
can u please check the example

Link to comment
Share on other sites

[quote author=gotit link=topic=115271.msg469273#msg469273 date=1163722249]
I need to rewrite my url.
currently it reads like:

/system/listingView.php?listingCode=1029
/system/listingView.php?listingCode=1030
....
/system/listingView.php?listingCode=1050

Spiders might read them all as one page...

I prefere for the url to reflect some variables from the page like Listing_address and/or Listing_style

I have very limited knowledge of html

thanx
[/quote]

How can we get this done? Donie and LuckyBambu help me on this. I did everything according to the instructions..... see above posts.
Link to comment
Share on other sites

[quote author=gotit link=topic=115271.msg469367#msg469367 date=1163732476]
One thing I don't understand is:
when i creat the file past the code in it and then want to save as--- I simply past ".htaccess" in the file name with nothing following it.
and this file shows as .htaccess on my pc, but once I load it it shows as ".htaccess.txt" on the server. Does that has to do anything with it.

I also tried deleting that .txt on the server.

I do have access to hosting control panel, but there is no option for me to creat a file
these are the options categories:

1and1  is the host
[/quote]
When you create the .htaccess file in notepad you'll need to change the Save as type pull down menu to all files. Otherwise what ever you place in the File name box it'll add .txt extension to the end of the filename. Another method is to wrap quotes around the file like so:
".htaccess"

That way notepad wont add the .txt extension to the end of the filename when you click save button.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.