I have my pages categorized as below....
Main index.html is in the root, so this displays when the domain is entered into a browser.
May pages are categorized as below...
/Pages/Automotive/Ford/Mustang/*.html
/Pages/Automotive/Chevy/Camaro/*.html
/Pages/Automotive/Dodge/Charger/*.html
etc...
What I am looking for is a way to hide the subfolders from the url in the browser..
So, if a link, shortcut, or page is at the following:
/Pages/Automotive/Ford/Mustang/Main.html
The following is displayed in the url status bar on the browser...
/Ford/Mustang/Main.html
or even
/Mustang/Main.html
Basically masking the /Pages/Automotive/ Sub Directories.
And, if a this is entered in the browser:
/Ford/Mustang/Main.html
Then, the original page is still displayed at
/Pages/Automotive/Ford/Mustang/Main.html
Is this doable? If so how, I have looked into .htaccess, but I haven't found what I need..
I am also using 1and1 as my hosting company..
Related
I have change the page name from au-op to auop which is the main page but under the page there are lot of sub pages where the name of the page as displaying as au-op in different fields. now i want to change the page from au-op to auop from all content with groovy script. can anyone help me from these.
You mean something like this?
s = s.replace('au-op', 'auop')
I have an issue on my website which is on CodeIgniter.
All links are making a duplicate copy of each with #! included in URL
for example
https://www.example.com/port-of-portsmouth
link to a page on my website which is duplicated like the below link
https://www.example.com/port-of-portsmouth#!
Both links have the same page content. How to get rid of this error to avoid content duplication
How to get rid of this error to avoid content duplication
You can't
Because # is used as a fragment identifier. For an example, if the URL is https://example.com/#data this means that open the example.com and jump to a specific section of the page with id"data"
See this URL, https://jestjs.io/docs/en/cli.html#cache
When you open the page, it jumps to cache section.
So, basically, your content is not duplicated, it's just opening the same page and then browser tries to navigate to id !, which might not be there and hence nothing special happens.
I have a search module on the home page and when I use it it stays on the homepage and shows nothing and when I use it on other parts of the website it works. When I use the search on the home page it shows this URL in the address bar:
http://127.0.0.1/esg/index.php/component/search/?searchword=test&searchphrase=all&Itemid=435
I've tried to check the PHP file of the module in /modules/mod_search but it seems normal because it works elsewhere.
Create a menu item of type "Search - Search Results" in Joomla and then clear your Joomla cache. That should fix your problem.
In my magento module there is an extension.
Some urls like
http://www.domain.com/abc/p#abcs.html
http://www.domain.com/abc/p#xyz.html
etc
But when browsing http://www.domain.com/abc/p -> lead to blank page
I do not need http://www.domain.com/abc/p url
Is anybody help me
I want to redirect the url http://www.domain.com/abc/p to 404 page
without affecting its childs
ie
1. http://www.domain.com/abc/p#abcs.html
2. http://www.domain.com/abc/p#xyz.html
Points to its current position and
http://www.domain.com/abc/p to 404
Any help apperciated
Based on your comment it seems http://www.domain.com/abc/p#abcs.html shows proper content but http://www.domain.com/abc/p shows blank page.
In that case you can't do that via .htaccess because on server side URL will always be: http://www.domain.com/abc/p.
You need to put some custom Javascript in your page and redirect to some non-existant page (resulting in 404) by checking location.href using your Javascript.
I am building a website which calls for a page selector on product search results, the page selector currently adds a forward slash and a number (representing the page) to the end of the current URL.
e.g. If I am browsing Washing Machines on "/laundry/Washing-Machines" and I click page 2 on the selector it takes me to "/laundry/Washing-Machines/2" and page 2 loads, this is working fine.
Now, the problem I am having...
I have a form in the sidebar where the user can filter Range Cooker search results by brand, fuel type, size and colour. The form gathers the products from the database that meet the search criteria, and displays the results along side the page selector.
If I leave the form values as default and submit the form I am presented with the results on "/cooking/Range-Cookers/Search?brand=0&type=0&size=0&colour=0" but when I click page 2 on the selector I am taken to "cooking/Range-Cookers/2" which presents me with a 404. If I add "&page=2" to the end of the original URL I am presented with page 2.
Since the page selector is a php include and works fine for every product except the results from my Range Cooker form, I would rather find a solution that leaves the selector php intact.
Is there any way I can add a redirect to .htaccess which would take a link from my page selector e.g. "cooking/Range-Cookers/5" and correctly apply it to the current URL with all form variables intact e.g. "cooking/Range-Cookers/Search?brand=1&type=2&size=0&colour=0&page=5"?
I have experience in HTML, CSS and PHP, but I am new to editing .htaccess and would appreciate any insight into how I can accomplish this. Thanks.
You cannot do this with .htaccess, because the information is not available, when the request hits Apache, or .htaccess for that matter.
When you click the link for page 2, the client requests the URL in the associated href attribute. It doesn't provide any other information available on the current page. If you want this information transmitted, you must modify the link for page 2 from
cooking/Range-Cookers/2
to
cooking/Range-Cookers/Search?brand=1&type=2&size=0&colour=0&page=2
when you deliver the page to the client. Same goes for any other information you need for following pages.