Jump to content

htaccess - how could I remove a folder in the path?


milanello72

Recommended Posts

Hello!

I have 2 problems with .htaccess .

1) I have a path

http://www.myaccount.domain.com/katarina/index.php

and I want to remove the folder katarina and to obtain

http://www.myaccount.domain.com/index.php

How could I solve this problem?

 

2) I have a path on localhost

http://127.0.0.1:8888/katarina/index.php

and I want to remove the folder katarina and to obtain

http://127.0.0.1:8888/index.php

(soI want to remove my folder "katarina")

How could I solve this problem?

 

Thank you!

Edited by milanello72
Link to comment
Share on other sites

Hello, Requinix!  :)

I have tried, but didn't work.

In this moment you could see the link here

 

http://www.katarinabulatovic.uhostall.com/32katarina/index.php

And I want to obtain

 

http://www.katarinabulatovic.uhostall.com/index.php

so without 32katarina.

 

I have all files in the folder 32katarina and .httaccess is

 

Options +FollowSymlinks

RewriteEngine on

php_flag session.auto_start 1

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


RewriteRule ^index.html index.php [N]


RewriteRule ^([a-zA-Z0-9-_]+).html$ index.php?pagina=$1 [L,QSA]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+).html$ index.php?pagina=$1&poll=$2 [L,QSA]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9-.\s]+)/([0-9-_]+)$ index.php?pagina=$1&paginaphoto=$2&id_photo=$3 [L,QSA]

AddType image/x-icon .ico
RewriteRule ^favicon.ico favicon.ico [NC,L]

ErrorDocument 404 /errors/404
ErrorDocument 403 /errors/403
ErrorDocument 500 /errors/500

 

What can I add in .htaccess ? Thank you!

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.