mod_rewrite for ugly URLs
Moderator: General Moderators
-
Daisy Cutter
- Forum Commoner
- Posts: 75
- Joined: Sun Aug 01, 2004 9:51 am
mod_rewrite for ugly URLs
Can anyone help me or give me a good site to find out about mod_rewrite.
Currently my URLs are very ugly (http://example.com/index.php?url=http:/ ... nclude.php)
I want to use mod_rewrite to make them like http://example.com/include.php or something.
Any answers?
Currently my URLs are very ugly (http://example.com/index.php?url=http:/ ... nclude.php)
I want to use mod_rewrite to make them like http://example.com/include.php or something.
Any answers?
you could create a frame set of 1px (top or bottom) and load in the other frame all your stuff.. your adresse will never change
ex : if it's http://www.l33t.com
if you go in csection contact the adress will still be : http://www.l33t.com
ex : if it's http://www.l33t.com
if you go in csection contact the adress will still be : http://www.l33t.com
-
Daisy Cutter
- Forum Commoner
- Posts: 75
- Joined: Sun Aug 01, 2004 9:51 am
I dont think thats a good practice because it breaks the URLs, I just want to simplify them.Draco_03 wrote:you could create a frame set of 1px (top or bottom) and load in the other frame all your stuff.. your adresse will never change
ex : if it's http://www.l33t.com
if you go in csection contact the adress will still be : http://www.l33t.com
With a frame, if you hit reload it will bring you back to the main page, and all links will load within the page, preventing bookmarking.
one of the reasons I registered a domain was to get away from the .tk frame stuff.
-
Daisy Cutter
- Forum Commoner
- Posts: 75
- Joined: Sun Aug 01, 2004 9:51 am
I need to get my URLs like this because google won't index my page with them the way they are, which is a tremendous drawback.
Anyone know a good tutorial, or can simply provide me with a way of turning
http://example.com/index.php?url=http:/ ... m/page.php into http://example.com/page.php (or even http://example.com/index.php/url/page.php is fine, I just need it to be search-engine friendly).
Anyone know a good tutorial, or can simply provide me with a way of turning
http://example.com/index.php?url=http:/ ... m/page.php into http://example.com/page.php (or even http://example.com/index.php/url/page.php is fine, I just need it to be search-engine friendly).
-
Daisy Cutter
- Forum Commoner
- Posts: 75
- Joined: Sun Aug 01, 2004 9:51 am
-
Daisy Cutter
- Forum Commoner
- Posts: 75
- Joined: Sun Aug 01, 2004 9:51 am
I did it:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^goto-(.*)$ /index.php?url=http://kafene.org/$1
Now my URLs are like http://kafene.org/goto-filename.php
But it's very tricky, one wrong link and I could get a loop, or images will stop working (they'll try to access goto-filename.php/img/image.png)
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^goto-(.*)$ /index.php?url=http://kafene.org/$1
Now my URLs are like http://kafene.org/goto-filename.php
But it's very tricky, one wrong link and I could get a loop, or images will stop working (they'll try to access goto-filename.php/img/image.png)
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
set a rule for your images
Code: Select all
RewriteRule images/(.*?)$ /images/$1